diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-07-30 11:55:36 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-10-22 04:28:19 -0400 |
commit | 3167893ae60e847b5a44d582fedb544cd0ae7ef5 (patch) | |
tree | 4919d6e5873983578d43b0d33b6396b56a955d01 /fs/ceph | |
parent | 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d (diff) |
ceph: reset cap hold timeout only for requeued inode
__cap_delay_requeue() only requeue inode which does not
have CEPH_I_FLUSH flag, so avoid reset cap hold timeout
for that inode.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index dd7dfdd2ba13..b26ae1673992 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -521,7 +521,6 @@ static void __cap_set_timeouts(struct ceph_mds_client *mdsc, | |||
521 | static void __cap_delay_requeue(struct ceph_mds_client *mdsc, | 521 | static void __cap_delay_requeue(struct ceph_mds_client *mdsc, |
522 | struct ceph_inode_info *ci) | 522 | struct ceph_inode_info *ci) |
523 | { | 523 | { |
524 | __cap_set_timeouts(mdsc, ci); | ||
525 | dout("__cap_delay_requeue %p flags %d at %lu\n", &ci->vfs_inode, | 524 | dout("__cap_delay_requeue %p flags %d at %lu\n", &ci->vfs_inode, |
526 | ci->i_ceph_flags, ci->i_hold_caps_max); | 525 | ci->i_ceph_flags, ci->i_hold_caps_max); |
527 | if (!mdsc->stopping) { | 526 | if (!mdsc->stopping) { |
@@ -531,6 +530,7 @@ static void __cap_delay_requeue(struct ceph_mds_client *mdsc, | |||
531 | goto no_change; | 530 | goto no_change; |
532 | list_del_init(&ci->i_cap_delay_list); | 531 | list_del_init(&ci->i_cap_delay_list); |
533 | } | 532 | } |
533 | __cap_set_timeouts(mdsc, ci); | ||
534 | list_add_tail(&ci->i_cap_delay_list, &mdsc->cap_delay_list); | 534 | list_add_tail(&ci->i_cap_delay_list, &mdsc->cap_delay_list); |
535 | no_change: | 535 | no_change: |
536 | spin_unlock(&mdsc->cap_delay_lock); | 536 | spin_unlock(&mdsc->cap_delay_lock); |