f2fs: fix to read source block before invalidating it
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 18 Jul 2019 01:31:53 +0000 (18:31 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 27 Jul 2019 00:49:04 +0000 (17:49 -0700)
commit543b8c468f55f27f3c0178a22a91a51aabbbc428
tree34ccdff9b2ee2dbde59707c0be74369afc1f0881
parentd5e5efa250cd644896f541551610fe7f0de35e0a
f2fs: fix to read source block before invalidating it

f2fs_allocate_data_block() invalidates old block address and enable new block
address. Then, if we try to read old block by f2fs_submit_page_bio(), it will
give WARN due to reading invalid blocks.

Let's make the order sanely back.

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