summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-11-22 06:50:45 +0100
committerYan, Zheng <zheng.z.yan@intel.com>2014-01-21 06:29:32 +0100
commit9563f88c1fa01341d125e396edc654a8dbcab2d2 (patch)
tree421b041c32cd218720bc1369b0abe1ce353d4547 /fs/ceph/caps.c
parentceph: use ceph_seq_cmp() to compare migrate_seq (diff)
downloadlinux-9563f88c1fa01341d125e396edc654a8dbcab2d2.tar.xz
linux-9563f88c1fa01341d125e396edc654a8dbcab2d2.zip
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 2c39d9fe18d7..d2154d63f671 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;
}