From: John L. Hammond Date: Thu, 19 Mar 2015 14:41:19 +0000 (-0500) Subject: LU-6384 mdt: propagate find errors in mdt_fid2path() X-Git-Tag: 2.7.51~31 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ef019f2f0b30290f0357f4d7970aaf32d41f8606;p=fs%2Flustre-release.git LU-6384 mdt: propagate find errors in mdt_fid2path() In mdt_fid2path() propagate the specific error from mdt_object_find() rather than returning -EINVAL. Signed-off-by: John L. Hammond Change-Id: Ib09f3741f95c0f3484f9a7839e31c583ecc34761 Reviewed-on: http://review.whamcloud.com/14108 Tested-by: Jenkins Reviewed-by: frank zago Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index aec10b3..0e26b18 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -5598,10 +5598,11 @@ static int mdt_fid2path(struct mdt_thread_info *info, } obj = mdt_object_find(info->mti_env, mdt, &fp->gf_fid); - if (obj == NULL || IS_ERR(obj)) { - CDEBUG(D_IOCTL, "no object "DFID": %ld\n", PFID(&fp->gf_fid), - PTR_ERR(obj)); - RETURN(-EINVAL); + if (IS_ERR(obj)) { + rc = PTR_ERR(obj); + CDEBUG(D_IOCTL, "cannot find "DFID": rc = %d\n", + PFID(&fp->gf_fid), rc); + RETURN(rc); } if (mdt_object_remote(obj))