ceph_check_caps() can't request new max size for async creating inode. This may make ceph_get_caps() loop busily until getting reply of the async create. This patch also waits for async creating inode before calling ceph_renew_caps() Signed-off-by: "Yan, Zheng" <zyan@xxxxxxxxxx> --- fs/ceph/caps.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index f63db3cb9c4f..14bedf2c16cd 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2832,6 +2832,11 @@ int ceph_get_caps(struct file *filp, int need, int want, } if (ret < 0) { + if (ret == -EFBIG || ret == -ESTALE) { + int ret2 = ceph_wait_on_async_create(inode); + if (ret2 < 0) + return ret2; + } if (ret == -EFBIG) { check_max_size(inode, endoff); continue; -- 2.21.1