]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: wait on async create before checking caps wip-jlayton-55857
authorJeff Layton <jlayton@kernel.org>
Mon, 6 Jun 2022 15:07:59 +0000 (11:07 -0400)
committerJeff Layton <jlayton@kernel.org>
Mon, 6 Jun 2022 15:07:59 +0000 (11:07 -0400)
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 <jlayton@kernel.org>
fs/ceph/caps.c

index 0a48bf829671c08fb7a63befcf561343b29c189a..5ecfff4b37c9e7405d8c047312547c9f298b940d 100644 (file)
@@ -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);