]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: don't clear I_NEW until inode metadata is fully populated
authorJeff Layton <jlayton@kernel.org>
Wed, 11 Dec 2019 20:21:24 +0000 (15:21 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 10 Jan 2020 10:11:06 +0000 (11:11 +0100)
commitb2633347248337a01d84cde12513a218e0441e7c
tree9797d69991e6938a0b6d17ab20506493f052e3ef
parent4931910513411c661450cfb49960610f19886743
ceph: don't clear I_NEW until inode metadata is fully populated

Currently, we could have an open-by-handle (or NFS server) call
into the filesystem and start working with an inode before it's
properly filled out.

Don't clear I_NEW until we have filled out the inode, and discard it
properly if that fails. Note that we occasionally take an extra
reference to the inode to ensure that we don't put the last reference in
discard_new_inode, but rather leave it for ceph_async_iput.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/inode.c