]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
vfs: export new_inode_pseudo
authorJeff Layton <jlayton@kernel.org>
Tue, 1 Sep 2020 13:19:00 +0000 (09:19 -0400)
committerJeff Layton <jlayton@kernel.org>
Tue, 7 Dec 2021 15:32:46 +0000 (10:32 -0500)
commitcbb9f5bafa06bf52e324d33ea5ea2b7c353b54d6
treebc5ea6e7d32e07001fa92ced56920ad1a273b0c8
parentae818b568c077affbcc56b8cb8284ed29a9d502f
vfs: export new_inode_pseudo

Ceph needs to be able to allocate inodes ahead of a create that might
involve a fscrypt-encrypted inode. new_inode() almost fits the bill,
but it puts the inode on the sb->s_inodes list and when we go to hash
it, that might be done again.

We could work around that by setting I_CREATING on the new inode, but
that causes ilookup5 to return -ESTALE if something tries to find it
before I_NEW is cleared. This is desirable behavior for most
filesystems, but doesn't work for ceph.

To work around all of this, just use new_inode_pseudo which doesn't add
it to the sb->s_inodes list.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/inode.c