mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
546d402085
commit
42d70f8e31
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue