]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix rdlock snap inode
authorYan, Zheng <zyan@redhat.com>
Tue, 20 Jan 2015 13:11:08 +0000 (21:11 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 5 Feb 2015 14:40:39 +0000 (22:40 +0800)
make sure the "sync head inode" code  execute

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/Locker.cc

index 212a042c58336f5b28b433976f2faddf8ee5845c..02844864009f6ee1fe3d94d6e0704c996016cea5 100644 (file)
@@ -1253,9 +1253,6 @@ bool Locker::rdlock_start(SimpleLock *lock, MDRequestRef& mut, bool as_anon)
       return true;
     }
 
-    if (!_rdlock_kick(lock, as_anon))
-      break;
-
     // hmm, wait a second.
     if (in && !in->is_head() && in->is_auth() &&
        lock->get_state() == LOCK_SNAP_SYNC) {
@@ -1270,6 +1267,9 @@ bool Locker::rdlock_start(SimpleLock *lock, MDRequestRef& mut, bool as_anon)
        // oh, check our lock again then
       }
     }
+
+    if (!_rdlock_kick(lock, as_anon))
+      break;
   }
 
   // wait!