Commit d7cd3702 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: fix return value of move_data_block()

If f2fs_grab_cache_page() fails, it needs to return -ENOMEM.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent b7973091
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment