From: John L. Hammond Date: Wed, 7 Oct 2015 18:11:52 +0000 (-0500) Subject: LU-7263 mdt: put mnew in mdt_reint_rename_internal() X-Git-Tag: 2.7.63~46 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6fb74fc4b55fc6f661a127d80360235b3239d362;p=fs%2Flustre-release.git LU-7263 mdt: put mnew in mdt_reint_rename_internal() In mdt_reint_rename_internal() if the mnew object is remote then put it before returning. Signed-off-by: John L. Hammond Change-Id: I7a380f2d54d6546a9009c062ead7c77b8c8a88ee Reviewed-on: http://review.whamcloud.com/16751 Tested-by: Jenkins Reviewed-by: wangdi Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index 7b4af4a..430900f 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -1851,7 +1851,7 @@ static int mdt_reint_rename_internal(struct mdt_thread_info *info, LASSERT(repbody != NULL); repbody->mbo_fid1 = *new_fid; repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS); - GOTO(out_put_old, rc = -EXDEV); + GOTO(out_put_new, rc = -EXDEV); } /* Before locking the target dir, check we do not replace * a dir with a non-dir, otherwise it may deadlock with