diff options
author | 2017-09-07 10:40:54 +0800 | |
---|---|---|
committer | 2017-09-07 20:57:20 -0700 | |
commit | 27161f13e3c3241944846ac24942a85cceda0a2c (patch) | |
tree | bdd36b6171f9d48fd4a3c68c6f091697bb4cfaba /tools/perf/scripts/python/export-to-postgresql.py | |
parent | f2fs: make get_lock_data_page to handle encrypted inode (diff) | |
download | wireguard-linux-27161f13e3c3241944846ac24942a85cceda0a2c.tar.xz wireguard-linux-27161f13e3c3241944846ac24942a85cceda0a2c.zip |
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions