OSDN Git Service

vfs: factor out inode_insert5()
authorMiklos Szeredi <miklos@szeredi.hu>
Thu, 17 May 2018 08:53:05 +0000 (10:53 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 31 May 2018 09:06:11 +0000 (11:06 +0200)
commit80ea09a002bf4384fda5f087b1b198b3a274f9da
tree08ee21a4a557b0dfbd3878ab03d6225d3c5c7dd4
parentb148cba403f4fc9c99f0a596e35047395b748169
vfs: factor out inode_insert5()

Split out common helper for race free insertion of an already allocated
inode into the cache.  Use this from iget5_locked() and
insert_inode_locked4().  Make iget5_locked() use new_inode()/iput() instead
of alloc_inode()/destroy_inode() directly.

Also export to modules for use by filesystems which want to preallocate an
inode before file/directory creation.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/inode.c
include/linux/fs.h