OSDN Git Service

f2fs: fix to avoid potential race on sbi->unusable_block_count access/update
authorChao Yu <yuchao0@huawei.com>
Sun, 5 May 2019 03:40:46 +0000 (11:40 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 9 May 2019 05:00:19 +0000 (22:00 -0700)
commitee588a7f2329744b94615a0c2571cfe810983855
tree1f4db9bcbf2f5c7c632d1ad23975e7e0214f4468
parent993543bcbad298a2109ccc60af35b756d8158c75
f2fs: fix to avoid potential race on sbi->unusable_block_count access/update

Use sbi.stat_lock to protect sbi->unusable_block_count accesss/udpate, in
order to avoid potential race on it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/segment.c
fs/f2fs/super.c