]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
uclient: compare _revoked_ caps when deciding whether to release.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 12 May 2011 22:43:23 +0000 (15:43 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 12 May 2011 22:43:23 +0000 (15:43 -0700)
cap->issued is already set to new_caps, so that branch was never taken!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/client/Client.cc

index 629816c78a4cf4967521be6341cb4eeb110f02e3..eec9253f3b3290b32af592e08a814f064bede239 100644 (file)
@@ -2935,7 +2935,7 @@ void Client::handle_cap_grant(Inode *in, int mds, InodeCap *cap, MClientCaps *m)
     dout(10) << "  revocation of " << ccap_string(~new_caps & old_caps) << dendl;
     cap->issued = new_caps;
 
-    if ((cap->issued & ~new_caps) & CEPH_CAP_FILE_CACHE)
+    if ((cap->issued & ~old_caps) & CEPH_CAP_FILE_CACHE)
       _release(in, false);
 
     if ((used & ~new_caps) & CEPH_CAP_FILE_BUFFER)