]> git.baikalelectronics.ru Git - kernel.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>
Mon, 27 Jan 2020 15:53:39 +0000 (16:53 +0100)
commitb5a83669768403d54be937059f729702e5157685
tree4cb487e297445eaf405dcd70275b23b8a953bd52
parent10296f8625e19f19630ead2b2e5a4403e3312294
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>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/inode.c