OSDN Git Service

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>
Tue, 30 Jul 2019 20:51:36 +0000 (13:51 -0700)
commitd60f1f3a6850c49ab7625b5575dc79984047c20c
tree37485998c18ce770233616870c09ad593f47b67c
parentce59b006256b32340c170028c7985624b55590e0
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