WSL2-Linux-Kernel/fs/f2fs
Yunlei He 27161f13e3 f2fs: avoid race in between read xattr & write xattr
Thread A:					Thread B:
-f2fs_getxattr
   -lookup_all_xattrs
      -xnid = F2FS_I(inode)->i_xattr_nid;
						-f2fs_setxattr
						    -__f2fs_setxattr
						        -write_all_xattrs
						            -truncate_xattr_node
							          ...  ...
						-write_checkpoint
								  ...  ...
						-alloc_nid   <- nid reuse
          -get_node_page
              -f2fs_bug_on  <- nid != node_footer->nid

It's need a rw_sem to avoid the race

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-09-07 20:57:20 -07:00
..
Kconfig
Makefile f2fs: move sysfs code from super.c to fs/f2fs/sysfs.c 2017-07-04 02:11:45 -07:00
acl.c f2fs: preserve i_mode if __f2fs_set_acl() fails 2017-07-28 17:48:54 -07:00
acl.h
checkpoint.c f2fs: support journalled quota 2017-08-21 15:54:48 -07:00
data.c f2fs: make get_lock_data_page to handle encrypted inode 2017-09-07 20:55:51 -07:00
debug.c f2fs: show available_nids in f2fs/status 2017-05-03 10:04:57 -07:00
dir.c f2fs: do not set LOST_PINO for newly created dir 2017-07-07 10:34:45 -07:00
extent_cache.c f2fs: fix a bug caused by NULL extent tree 2017-05-23 21:07:18 -07:00
f2fs.h f2fs: avoid race in between read xattr & write xattr 2017-09-07 20:57:20 -07:00
file.c f2fs: use generic terms used for encrypted block management 2017-09-05 20:21:48 -07:00
gc.c f2fs: use generic terms used for encrypted block management 2017-09-05 20:21:48 -07:00
gc.h f2fs: fix potential overflow when adjusting GC cycle 2017-08-15 10:40:14 -07:00
hash.c f2fs: check entire encrypted bigname when finding a dentry 2017-05-04 11:44:35 -04:00
inline.c f2fs: introduce f2fs_encrypted_file for clean-up 2017-09-05 20:11:29 -07:00
inode.c f2fs: don't check inode's checksum if it was dirtied or writebacked 2017-09-05 10:50:11 -07:00
namei.c f2fs: update i_flags correctly 2017-09-05 10:50:21 -07:00
node.c f2fs: don't check inode's checksum if it was dirtied or writebacked 2017-09-05 10:50:11 -07:00
node.h f2fs: simplify the way of calulating next nat address 2017-07-04 02:11:34 -07:00
recovery.c f2fs: check hot_data for roll-forward recovery 2017-08-21 15:55:06 -07:00
segment.c f2fs: use generic terms used for encrypted block management 2017-09-05 20:21:48 -07:00
segment.h f2fs: wake up discard_thread iff there is a candidate 2017-08-29 10:05:33 -07:00
shrinker.c
super.c f2fs: avoid race in between read xattr & write xattr 2017-09-07 20:57:20 -07:00
sysfs.c f2fs: wake up discard_thread iff there is a candidate 2017-08-29 10:05:33 -07:00
trace.c f2fs: use set_page_private marcro in f2fs_trace_pid 2017-03-24 15:10:49 -04:00
trace.h
xattr.c f2fs: avoid race in between read xattr & write xattr 2017-09-07 20:57:20 -07:00
xattr.h f2fs: guard macro variables with braces 2017-04-10 19:48:10 -07:00