]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: adjust LocalLock can_xlock_local().
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 7 Apr 2011 00:03:12 +0000 (17:03 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 17 Apr 2011 04:02:56 +0000 (21:02 -0700)
I don't remember why we needed can_xlock_local() to begin with, but
I can tell that adding this get_xlock_by() check won't stop anything
working that was ever working to begin with (really it's still not
strong enough a check).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/LocalLock.h

index 70a5482808665de68f8d8163097e56dfecfcdcc9..c797ea7d3a240e2ddd54017eb0f95064fa441f4d 100644 (file)
@@ -32,7 +32,7 @@ public:
   }
 
   bool can_xlock_local() const {
-    return !is_wrlocked();
+    return !is_wrlocked() && (get_xlock_by() == 0);
   }
 
   bool can_wrlock() const {