diff options
author | Yan, Zheng <zyan@redhat.com> | 2020-03-10 19:34:19 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-03-30 12:42:43 +0200 |
commit | 42d70f8e31dfd3b795259b0d5c7ff4d4b45c24fd (patch) | |
tree | 1e88c9bfc065fe8df6e6e75539c2cee8860252c8 /fs/ceph | |
parent | 546d402085d6ea3c13bdea62a98b48a53c18eed4 (diff) | |
download | lwn-42d70f8e31dfd3b795259b0d5c7ff4d4b45c24fd.tar.gz lwn-42d70f8e31dfd3b795259b0d5c7ff4d4b45c24fd.zip |
ceph: request new max size only when there is auth cap
When there is no auth cap, check_max_size() can't do anything and may
cause an infinite loop inside ceph_get_caps().
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
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 78a305068cac..086bb3adc08a 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2582,7 +2582,7 @@ again: dout("get_cap_refs %p endoff %llu > maxsize %llu\n", inode, endoff, ci->i_max_size); if (endoff > ci->i_requested_max_size) - ret = -EFBIG; + ret = ci->i_auth_cap ? -EFBIG : -ESTALE; goto out_unlock; } /* |