]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
* bugfix on filelock caps callback
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 7 Jun 2007 00:34:07 +0000 (00:34 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 7 Jun 2007 00:34:07 +0000 (00:34 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1410 29311d96-e01e-0410-9327-a35deaab8ce9

branches/sage/cephmds2/mds/Locker.cc

index 836b76ca966987118cd78b3010419fca9cec8dbe..87fb8abaab45f0f442d6316ff8b9a90f3d1cb4e1 100644 (file)
@@ -2199,21 +2199,18 @@ void Locker::handle_file_lock(FileLock *lock, MLock *m)
     assert(lock->get_state() == LOCK_SYNC ||
            lock->get_state() == LOCK_MIXED);
     
+    lock->set_state(LOCK_GLOCKR);
+    
     // call back caps?
     if (issued & CAP_FILE_RD) {
       dout(7) << "handle_file_lock client readers, gathering caps on " << *in << endl;
       issue_caps(in);
+      break;
     }
     if (lock->is_rdlocked()) {
       dout(7) << "handle_file_lock rdlocked, waiting before ack on " << *in << endl;
-      lock->set_state(LOCK_GLOCKR);
       break;
     } 
-    if (issued & CAP_FILE_RD) {
-      dout(7) << "handle_file_lock RD cap issued, waiting before ack on " << *in << endl;
-      lock->set_state(LOCK_GLOCKR);
-      break;
-    }
     
     // nothing to wait for, lock and ack.
     {