Message ID | 1374373274-3457-2-git-send-email-zheng.z.yan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 30e014a..7bbb749 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1776,6 +1776,10 @@ bool Locker::issue_caps(CInode *in, Capability *only_cap) continue; } + // notify clients about deleted inode, to make sure they release caps ASAP. + if (in->inode.nlink == 0) + wanted |= CEPH_CAP_LINK_SHARED; + // are there caps that the client _wants_ and can have, but aren't pending? // or do we need to revoke? if (((wanted & allowed) & ~pending) || // missing wanted+allowed caps