f2fs: update cur_valid_map_mir together with cur_valid_map
authorYunlong Song <yunlong.song@huawei.com>
Wed, 2 Aug 2017 13:20:13 +0000 (21:20 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 10 Aug 2017 00:45:21 +0000 (17:45 -0700)
commit6415fedc572219e0c8e6b4d3c17c46ed36997ae7
tree87a23aea41b2d0c2ed7dda0ab1440b780861087b
parenta36c106dffb616250117efb1cab271c19a8f94ff
f2fs: update cur_valid_map_mir together with cur_valid_map

When cur_valid_map passes the f2fs_test_and_set(,clear)_bit test,
cur_valid_map_mir update is skipped unlikely, so fix it. The fix
now changes the mirror check together with cur_valid_map all the
time.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: Fix unused variable and add unlikely for corner condition.]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c