Message ID | 20191216051207.8667-1-xiubli@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: only touch the caps which have the subset mask requested | expand |
On Mon, 2019-12-16 at 00:12 -0500, xiubli@redhat.com wrote: > From: Xiubo Li <xiubli@redhat.com> > > For the caps having no any subset mask requested we shouldn't touch > them. > > Signed-off-by: Xiubo Li <xiubli@redhat.com> > --- > fs/ceph/caps.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c > index 1d7f66902b0a..b9e5960df183 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; Looks correct to me. Merged. Thanks,
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 1d7f66902b0a..b9e5960df183 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;