Commit 42d70f8e authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

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: default avatar"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 546d4020
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}
		/*