aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobi Jam <[email protected]>2016-05-04 10:28:52 -0400
committerGreg Kroah-Hartman <[email protected]>2016-05-09 14:01:14 +0200
commit1e5a6fa96689232faf92b2352dd4bb0fda28b37e (patch)
treea81fe2af53e237fc588b429a1d68d48e7e03579f
parent4096e645d85d575e7b6e699f470f5519c34fda5d (diff)
staging: lustre: nfs: don't panic NFS server if MDS fails to find FID
When MDS fails to retrive the parent's fid, we'd handle it without crashing the NFS server. Signed-off-by: Bobi Jam <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3952 Reviewed-on: http://review.whamcloud.com/8459 Reviewed-by: Fan Yong <[email protected]> Reviewed-by: wangdi <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_nfs.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index 61cb5ff2cc22..c1eef6198b25 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -322,11 +322,14 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
return ERR_PTR(rc);
}
body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
- LASSERT(body->valid & OBD_MD_FLID);
-
- CDEBUG(D_INFO, "parent for " DFID " is " DFID "\n",
- PFID(ll_inode2fid(dir)), PFID(&body->fid1));
-
+ /*
+ * LU-3952: MDT may lost the FID of its parent, we should not crash
+ * the NFS server, ll_iget_for_nfs() will handle the error.
+ */
+ if (body->valid & OBD_MD_FLID) {
+ CDEBUG(D_INFO, "parent for " DFID " is " DFID "\n",
+ PFID(ll_inode2fid(dir)), PFID(&body->fid1));
+ }
result = ll_iget_for_nfs(dir->i_sb, &body->fid1, NULL);
ptlrpc_req_finished(req);