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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user