From 7c46f1711833c0f08279483d40e194e2af4c7aed Mon Sep 17 00:00:00 2001 From: wangdi Date: Tue, 1 Aug 2006 00:31:14 +0000 Subject: [PATCH] Branch: b_new_cmd we should check whether srcid is equal to tgtid before really rename --- lustre/mdt/mdt_reint.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 1.8.3.1