diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-01-29 15:15:47 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-02-20 12:16:07 +0100 |
commit | c1944fedd8c492ce1c1a99ca9064dcc7bafa80e9 (patch) | |
tree | 391d043097c793dacc36aae7c9c9e354d80553bb /fs/ceph/super.h | |
parent | ceph: make sure flushing inode in proper session's cap_flushing list (diff) | |
download | linux-c1944fedd8c492ce1c1a99ca9064dcc7bafa80e9.tar.xz linux-c1944fedd8c492ce1c1a99ca9064dcc7bafa80e9.zip |
ceph: avoid calling ceph_renew_caps() infinitely
__ceph_caps_mds_wanted() ignores caps from stale session. So the
return value of __ceph_caps_mds_wanted() can keep the same across
ceph_renew_caps(). This causes try_get_cap_refs() to keep calling
ceph_renew_caps(). The fix is ignore the session valid check for
the try_get_cap_refs() case. If session is stale, just let the
caps requester sleep.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index f3f9215abf8e..6477264bfc7e 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -602,7 +602,7 @@ static inline int __ceph_caps_wanted(struct ceph_inode_info *ci) } /* what the mds thinks we want */ -extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci); +extern int __ceph_caps_mds_wanted(struct ceph_inode_info *ci, bool check); extern void ceph_caps_init(struct ceph_mds_client *mdsc); extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); |