For snap_caps, who cares if the live inode has a cap for this client. We
always want to issue the maximum set of caps the inode locks allow for
a live inode or snapped inode with caps, or the max caps ever for a snapped
inode without caps.
Signed-off-by: Sage Weil <sage@newdream.net>
* multiversion.
*/
e.cap.caps = valid ? get_caps_allowed_by_type(CAP_ANY) : CEPH_STAT_CAP_INODE;
- if (cap)
- e.cap.caps = e.cap.caps & cap->issued();
+ if (last == CEPH_NOSNAP || is_any_caps())
+ e.cap.caps = e.cap.caps & get_caps_allowed_for_client(client);
e.cap.seq = 0;
e.cap.mseq = 0;
e.cap.realm = 0;