linux-IllusionX/fs/f2fs
Al Viro 1e2e547a93 do d_instantiate/unlock_new_inode combinations safely
For anything NFS-exported we do _not_ want to unlock new inode
before it has grown an alias; original set of fixes got the
ordering right, but missed the nasty complication in case of
lockdep being enabled - unlock_new_inode() does
	lockdep_annotate_inode_mutex_key(inode)
which can only be done before anyone gets a chance to touch
->i_mutex.  Unfortunately, flipping the order and doing
unlock_new_inode() before d_instantiate() opens a window when
mkdir can race with open-by-fhandle on a guessed fhandle, leading
to multiple aliases for a directory inode and all the breakage
that follows from that.

	Correct solution: a new primitive (d_instantiate_new())
combining these two in the right order - lockdep annotate, then
d_instantiate(), then the rest of unlock_new_inode().  All
combinations of d_instantiate() with unlock_new_inode() should
be converted to that.

Cc: stable@kernel.org	# 2.6.29 and later
Tested-by: Mike Marshall <hubcap@omnibond.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2018-05-11 15:36:37 -04:00
..
acl.c
acl.h
checkpoint.c f2fs: check blkaddr more accuratly before issue a bio 2018-03-18 23:33:50 -07:00
data.c page cache: use xa_lock 2018-04-11 10:28:39 -07:00
debug.c
dir.c page cache: use xa_lock 2018-04-11 10:28:39 -07:00
extent_cache.c f2fs: remove redundant initialization of pointer 'p' 2018-03-13 08:05:45 +09:00
f2fs.h f2fs: remain written times to update inode during fsync 2018-04-03 18:52:47 -07:00
file.c f2fs: truncate preallocated blocks in error case 2018-04-02 20:09:34 -07:00
gc.c xarray: add the xa_lock to the radix_tree_root 2018-04-11 10:28:39 -07:00
gc.h
hash.c
inline.c page cache: use xa_lock 2018-04-11 10:28:39 -07:00
inode.c f2fs: remain written times to update inode during fsync 2018-04-03 18:52:47 -07:00
Kconfig
Makefile
namei.c do d_instantiate/unlock_new_inode combinations safely 2018-05-11 15:36:37 -04:00
node.c page cache: use xa_lock 2018-04-11 10:28:39 -07:00
node.h f2fs: don't track new nat entry in nat set 2018-03-27 20:10:29 -07:00
recovery.c f2fs: fix to handle looped node chain during recovery 2018-03-13 08:05:40 +09:00
segment.c f2fs: Add a segment type check in inplace write 2018-03-27 20:13:54 -07:00
segment.h f2fs: check blkaddr more accuratly before issue a bio 2018-03-18 23:33:50 -07:00
shrinker.c
super.c f2fs: no need to initialize zero value for GFP_F2FS_ZERO 2018-03-27 20:12:53 -07:00
sysfs.c f2fs: introduce F2FS_FEATURE_LOST_FOUND feature 2018-03-17 14:02:47 +09:00
trace.c
trace.h
xattr.c f2fs: correct removexattr behavior for null valued extended attribute 2018-01-22 14:56:57 -08:00
xattr.h