]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Determine if there are file locks based on flockbl size, not dirty cap bit
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 13 May 2010 21:20:17 +0000 (14:20 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 2 Aug 2010 17:39:56 +0000 (10:39 -0700)
src/mds/Locker.cc

index b88c1c1e4c2a77560343a3d94962f237392d066c..9b26d665ea2324283706cd6158bce9157150f023 100644 (file)
@@ -1985,7 +1985,7 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
     }
   }
 
-  if (dirty & CEPH_CAP_FLOCK_EXCL) {
+  if (m->flockbl.length()) {
     int32_t num_locks;
     bufferlist::iterator bli = m->flockbl.begin();
     ::decode(num_locks, bli);
@@ -2005,7 +2005,6 @@ bool Locker::_do_cap_update(CInode *in, Capability *cap,
       ++in->flock_locks.client_held_lock_counts[decoded_lock.client];
     }
   }
-  dirty &= ~(CEPH_CAP_FLOCK_SHARED|CEPH_CAP_FLOCK_EXCL);
 
   if (!dirty && !change_max)
     return false;