Message ID | 20200310113421.174873-3-zyan@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fix ceph_get_caps() bugs | expand |
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 804f4c65251a..295b61201d85 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2582,7 +2582,7 @@ static int try_get_cap_refs(struct inode *inode, int need, int want, 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; } /*
When there is no auth cap, check_max_size() can't do anything, may cause infinite loop inside ceph_get_caps(). Signed-off-by: "Yan, Zheng" <zyan@redhat.com> --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)