Commit 0135c482 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: fix error path handling in truncate_dnode()

If truncate_node() fails in truncate_dnode(), it missed to call
f2fs_put_page(), fix it.

Fixes: 7735730d ("f2fs: fix to propagate error from __get_meta_page()")
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 5eda1ad1
......@@ -943,8 +943,10 @@ static int truncate_dnode(struct dnode_of_data *dn)
dn->ofs_in_node = 0;
f2fs_truncate_data_blocks(dn);
err = truncate_node(dn);
if (err)
if (err) {
f2fs_put_page(page, 1);
return err;
}
return 1;
}
......
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