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>
Loading
-
mentioned in commit 5c7ff5dc
-
mentioned in commit 7366d151
-
mentioned in commit d1ad7188
-
mentioned in commit 82a50afa
-
mentioned in commit f1e5f5a3
-
mentioned in commit 0a26b6d5
-
mentioned in commit 758dd4cd
-
mentioned in commit cfae80e6
-
mentioned in commit c891a305
-
mentioned in commit 05167f08
-
mentioned in commit dfd6ca25
-
mentioned in commit 497d20fc
-
mentioned in commit 82d8a4f6
Please sign in to comment