From 84644dc56183b67050793a1b8da07850508b29d6 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Thu, 12 May 2011 15:43:23 -0700 Subject: [PATCH] uclient: compare _revoked_ caps when deciding whether to release. cap->issued is already set to new_caps, so that branch was never taken! Signed-off-by: Greg Farnum --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 629816c78a4cf..eec9253f3b329 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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) -- 2.39.5