Skip to content

Commit

Permalink
f2fs: fix error path of f2fs_convert_inline_page()
Browse files Browse the repository at this point in the history
In error path of f2fs_convert_inline_page(), we missed to truncate newly
reserved block in .i_addrs[0] once we failed in get_node_info(), fix it.

Fixes: 7735730 ("f2fs: fix to propagate error from __get_meta_page()")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Chao Yu authored and Jaegeuk Kim committed Sep 6, 2019
1 parent d0995b5 commit e8c82c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/f2fs/inline.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ int f2fs_convert_inline_page(struct dnode_of_data *dn, struct page *page)

err = f2fs_get_node_info(fio.sbi, dn->nid, &ni);
if (err) {
f2fs_truncate_data_blocks_range(dn, 1);
f2fs_put_dnode(dn);
return err;
}
Expand Down

0 comments on commit e8c82c1

Please sign in to comment.