From: Jeff Layton Date: Mon, 6 Jun 2022 15:07:59 +0000 (-0400) Subject: ceph: wait on async create before checking caps X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec5ed88dcee856ab4497e943ab068f91a057b3d2;p=ceph-client.git ceph: wait on async create before checking caps Currently, we'll call ceph_check_caps, but if we're still waiting on the reply, we'll end up spinning around on the same inode. Wait for the async create reply before we try to flush caps. Signed-off-by: Jeff Layton --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 0a48bf829671..5ecfff4b37c9 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -4389,6 +4389,7 @@ static void flush_dirty_session_caps(struct ceph_mds_session *s) ihold(inode); dout("flush_dirty_caps %llx.%llx\n", ceph_vinop(inode)); spin_unlock(&mdsc->cap_dirty_lock); + ceph_wait_on_async_create(inode); ceph_check_caps(ci, CHECK_CAPS_FLUSH, NULL); iput(inode); spin_lock(&mdsc->cap_dirty_lock);