f2fs: fix to avoid race condition when updating sbi flag
authorChao Yu <yuchao0@huawei.com>
Tue, 20 Sep 2016 02:29:47 +0000 (10:29 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 30 Sep 2016 17:05:50 +0000 (10:05 -0700)
commitfadb2fb8af5348c1bc59cab17c6f8bf515e50d55
tree437503e890baf0603218fa20d36cbc1ecf3102ec
parent9e1e6df412a28cdbbd2909de5c6189eda4a3383d
f2fs: fix to avoid race condition when updating sbi flag

Making updating of sbi flag atomic by using {test,set,clear}_bit,
otherwise in concurrency scenario, the flag could be updated incorrectly.

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