]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix put_xlock() assert for slave masters
authorSage Weil <sage@newdream.net>
Wed, 3 Nov 2010 20:51:07 +0000 (13:51 -0700)
committerSage Weil <sage@newdream.net>
Wed, 3 Nov 2010 21:47:32 +0000 (14:47 -0700)
If we are a master of a slave, the state will be LOCK.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/SimpleLock.h

index 627461770ad1f8e8f6442e1e4d2b608d37d44aca..74a36d6fa525849f8646a4c841dd9c5ea40c2fe7 100644 (file)
@@ -481,7 +481,8 @@ public:
     more()->xlock_by = 0;
   }
   void put_xlock() {
-    assert(state == LOCK_XLOCK || state == LOCK_XLOCKDONE || is_locallock());
+    assert(state == LOCK_XLOCK || state == LOCK_XLOCKDONE || is_locallock() ||
+          state == LOCK_LOCK /* if we are a master of a slave */);
     --more()->num_xlock;
     parent->put(MDSCacheObject::PIN_LOCK);
     if (more()->num_xlock == 0) {