mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
f2fs: fix error path handling in truncate_dnode()
[ Upstream commit0135c482fa
] If truncate_node() fails in truncate_dnode(), it missed to call f2fs_put_page(), fix it. Fixes:7735730d39
("f2fs: fix to propagate error from __get_meta_page()") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
dfaa428d13
commit
0dc1f2b88b
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue