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:
Yan, Zheng
2013-11-22 13:50:45 +08:00
szülő d1b87809fb
commit 9563f88c1f
3 fájl változott, egészen pontosan 8 új sor hozzáadva és 4 régi sor törölve

Fájl megtekintése

@@ -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;
}