]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix gather deadlock in FileLock
authorSage Weil <sage@newdream.net>
Wed, 14 May 2008 17:08:51 +0000 (10:08 -0700)
committerSage Weil <sage@newdream.net>
Wed, 14 May 2008 17:08:51 +0000 (10:08 -0700)
src/mds/Locker.cc

index e0cad2cc2ffe64235cd30bee7235ee19a20e07aa..5e51c468f30de5dfd5e7561514193e183b37d622 100644 (file)
@@ -3067,12 +3067,10 @@ void Locker::file_lock(FileLock *lock)
       issue_caps(in);
     } else {
       //assert(issued);  // ??? -sage 2/19/06
-      if (issued) {
-        // change lock
-        lock->set_state(LOCK_GLOCKM);
-       lock->get_parent()->auth_pin();
-        
+      lock->set_state(LOCK_GLOCKM);
+      if (issued & ~lock->caps_allowed()) {
         // call back caps
+       lock->get_parent()->auth_pin();
         issue_caps(in);
       } else {
         lock->set_state(LOCK_LOCK);