f2fs: fix return value of move_data_block()

If f2fs_grab_cache_page() fails, it needs to return -ENOMEM.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2020-07-01 10:27:09 +08:00 committed by Jaegeuk Kim
parent b7973091f0
commit d7cd3702ca

View File

@ -849,8 +849,10 @@ static int move_data_block(struct inode *inode, block_t bidx,
mpage = f2fs_grab_cache_page(META_MAPPING(fio.sbi),
fio.old_blkaddr, false);
if (!mpage)
if (!mpage) {
err = -ENOMEM;
goto up_out;
}
fio.encrypted_page = mpage;