]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Locker::local_wrlock_finish now calls finish_waiters!
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 8 Oct 2010 21:35:58 +0000 (14:35 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 12 Oct 2010 14:49:56 +0000 (07:49 -0700)
Fixes a bug that could cause requests to hang since they were
put to sleep and never woken up.

src/mds/Locker.cc

index 00c1468bc7fa54d77a82c1162b4b9ef111f92326..3cbb6ab193b42380a7d15eab52765400bcf6e4e1 100644 (file)
@@ -3552,6 +3552,11 @@ void Locker::local_wrlock_finish(LocalLock *lock, Mutation *mut)
   lock->put_wrlock();
   mut->wrlocks.erase(lock);
   mut->locks.erase(lock);
+  if (lock->get_num_wrlocks() == 0) {
+    lock->finish_waiters(SimpleLock::WAIT_STABLE |
+                         SimpleLock::WAIT_WR |
+                         SimpleLock::WAIT_RD);
+  }
 }
 
 bool Locker::local_xlock_start(LocalLock *lock, MDRequest *mut)