From: wangdi Date: Tue, 1 Aug 2006 00:31:14 +0000 (+0000) Subject: Branch: b_new_cmd X-Git-Tag: v1_8_0_110~486^2~1309 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=7c46f1711833c0f08279483d40e194e2af4c7aed;p=fs%2Flustre-release.git Branch: b_new_cmd we should check whether srcid is equal to tgtid before really rename --- diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index fee76be..d0390cd 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -482,6 +482,9 @@ static int mdt_reint_rename(struct mdt_thread_info *info) if (rc == 0) { /* the new_fid should have been filled at this moment*/ + if (lu_fid_eq(old_fid, new_fid)) + GOTO(out_unlock_old, rc); + lh_newp->mlh_mode = LCK_EX; mnew = mdt_object_find_lock(info, new_fid, lh_newp, MDS_INODELOCK_FULL);