提交 42d70f8e 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

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: N"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: NJeff Layton <jlayton@kernel.org>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 546d4020
......@@ -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;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册