diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-10-18 10:45:32 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-10-27 20:25:59 -0700 |
commit | 28fc4e9077ce59ab28c89c20dc6be5154473218f (patch) | |
tree | 6620d57545df4228ead354adec4d2c21864728aa /Documentation/filesystems/nfs | |
parent | 14dc00a0e2dbea4b685ab9723ff511fcfd223c18 (diff) | |
download | linux-28fc4e9077ce59ab28c89c20dc6be5154473218f.tar.bz2 |
f2fs: Fix the race condition of resize flag between resizefs
Because the set/clear SBI_IS_RESIZEFS flag not between any locks,
In the following case:
thread1 thread2
->ioctl(resizefs)
->set RESIZEFS flag ->ioctl(resizefs)
... ->set RESIZEFS flag
->clear RESIZEFS flag
->resizefs stream
# No RESIZEFS flag in the stream
Also before freeze_super, the resizefs not started, we should not set
the SBI_IS_RESIZEFS flag.
So move the set/clear SBI_IS_RESIZEFS flag between the cp_mutex and
gc_lock.
Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress")
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'Documentation/filesystems/nfs')
0 files changed, 0 insertions, 0 deletions