Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e5a6fa9 authored by Bobi Jam's avatar Bobi Jam Committed by Greg Kroah-Hartman
Browse files

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: default avatarBobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3952
Reviewed-on: http://review.whamcloud.com/8459


Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Reviewed-by: default avatarwangdi <di.wang@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4096e645
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -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);

	/*
	 * 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);