From: Xiubo Li Date: Mon, 16 Dec 2019 05:12:07 +0000 (-0500) Subject: ceph: only touch the caps which have the subset mask requested X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f39cd75b7d53f77fc61a109e3ef85378f7d900c8;p=ceph-client.git 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 Signed-off-by: Jeff Layton --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 9d09bb53c1ab..28ae0c134700 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -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;