ceph: only touch the caps which have the subset mask requested

For the caps having no any subset mask requested we shouldn't touch
them.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Xiubo Li 2019-12-16 00:12:07 -05:00 committed by Ilya Dryomov
parent 893e456b2c
commit 9f8b72b3a9
1 changed files with 2 additions and 1 deletions

View File

@ -908,7 +908,8 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch)
ci_node);
if (!__cap_is_valid(cap))
continue;
__touch_cap(cap);
if (cap->issued & mask)
__touch_cap(cap);
}
}
return 1;