]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix can_rdlock_soon vs xlock on FileLock
authorSage Weil <sage@newdream.net>
Wed, 7 May 2008 23:22:29 +0000 (16:22 -0700)
committerSage Weil <sage@newdream.net>
Wed, 7 May 2008 23:22:29 +0000 (16:22 -0700)
src/mds/FileLock.h

index 17ef0d5f9426be3672f6d13af1d7ec0369eed04a..aa0b3f0c16278d2cdd1f29925aee27a40f6d832f 100644 (file)
@@ -147,7 +147,9 @@ class FileLock : public SimpleLock {
   }
   bool can_rdlock_soon() {
     if (parent->is_auth())
-      return (state == LOCK_GLOCKL);
+      return
+       (state == LOCK_GLOCKL) ||
+       (state == LOCK_LOCK && xlock_by);
     else
       return false;
   }