Whamcloud - gitweb
b=19870
authorzhanghc <zhanghc>
Wed, 24 Jun 2009 02:18:48 +0000 (02:18 +0000)
committerzhanghc <zhanghc>
Wed, 24 Jun 2009 02:18:48 +0000 (02:18 +0000)
fix a bug in "mds_reint_rename" which casuse
one lock not to be canceled

i=johann@sun.com
i=tappro@sun.com

lustre/mds/mds_reint.c

index 8fc9a40..d315dd2 100644 (file)
@@ -2518,6 +2518,9 @@ static int mds_reint_rename(struct mds_update_record *rec, int offset,
         old_inode = de_old->d_inode;
         new_inode = de_new->d_inode;
 
+        if (new_inode != NULL)
+                lock_count = 4;
+
         /* version recovery check */
         rc = mds_version_get_check(req, de_srcdir->d_inode, 0);
         if (rc)
@@ -2532,9 +2535,6 @@ static int mds_reint_rename(struct mds_update_record *rec, int offset,
         if (rc)
                 GOTO(cleanup_no_trans, rc);
 
-        if (new_inode != NULL)
-                lock_count = 4;
-
         /* sanity check for src inode */
         if (old_inode->i_ino == de_srcdir->d_inode->i_ino ||
             old_inode->i_ino == de_tgtdir->d_inode->i_ino)