]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix xlock authpinning
authorSage Weil <sage@newdream.net>
Mon, 23 Mar 2009 23:04:51 +0000 (16:04 -0700)
committerSage Weil <sage@newdream.net>
Mon, 23 Mar 2009 23:04:51 +0000 (16:04 -0700)
Remove extra auth_pin call.. we pin when going from LOCK
to LOCK_XLOCK.

src/mds/Locker.cc

index aa376bd61150c3153709c4205d8a555eb96dac09..50b1bf00c0c83dc50e8cfd4d389e0122d02dc783 100644 (file)
@@ -758,7 +758,6 @@ bool Locker::xlock_start(SimpleLock *lock, MDRequest *mut)
     // auth
     while (1) {
       if (lock->can_xlock(client)) {
-       lock->get_parent()->auth_pin(lock);
        lock->set_state(LOCK_XLOCK);
        lock->get_xlock(mut, client);
        mut->xlocks.insert(lock);
@@ -837,8 +836,8 @@ void Locker::xlock_finish(SimpleLock *lock, Mutation *mut)
        lock->get_num_rdlocks() == 0 &&
        lock->get_num_wrlocks() == 0 &&
        lock->get_num_client_lease() == 0) {
-      if (!lock->is_stable())
-       lock->get_parent()->auth_unpin(lock);
+      assert(!lock->is_stable());
+      lock->get_parent()->auth_unpin(lock);
       lock->set_state(LOCK_LOCK);
     }