summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-11-22 13:50:45 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2014-01-21 13:29:32 +0800
commit9563f88c1fa01341d125e396edc654a8dbcab2d2 (patch)
tree421b041c32cd218720bc1369b0abe1ce353d4547 /fs/ceph/caps.c
parentd1b87809fba3e07a261080837d1ae58d790b51a6 (diff)
downloadop-kernel-dev-9563f88c1fa01341d125e396edc654a8dbcab2d2.zip
op-kernel-dev-9563f88c1fa01341d125e396edc654a8dbcab2d2.tar.gz
ceph: fix cache revoke race
handle following sequence of events: - non-auth MDS revokes Fc cap. queue invalidate work - auth MDS issues Fc cap through request reply. i_rdcache_gen gets increased. - invalidate work runs. it finds i_rdcache_revoking != i_rdcache_gen, so it does nothing. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 2c39d9f..d2154d6 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -816,7 +816,7 @@ int __ceph_caps_revoking_other(struct ceph_inode_info *ci,
for (p = rb_first(&ci->i_caps); p; p = rb_next(p)) {
cap = rb_entry(p, struct ceph_cap, ci_node);
- if (cap != ocap && __cap_is_valid(cap) &&
+ if (cap != ocap &&
(cap->implemented & ~cap->issued & mask))
return 1;
}
OpenPOWER on IntegriCloud