diff options
| author | Yunlei He <heyunlei@huawei.com> | 2017-09-07 10:40:54 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-10-04 15:35:28 +0200 |
| commit | 0ff9056dd63fbbe7da6801c9c7ccc19b6e772411 (patch) | |
| tree | 067bdc7b8c98afe15b535ce031cc47aed37c30a8 /fs/f2fs/inline.c | |
| parent | 3aafd042cab3558fb7bb65f5138ec5f23fba33e5 (diff) | |
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 'fs/f2fs/inline.c')
0 files changed, 0 insertions, 0 deletions
