From a228f3a5ab259efe8bdc05661e4058acbc01f27c Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 24 Oct 2022 19:30:12 +0200 Subject: [PATCH] f2fs: should put a page when checking the summary info commit 7468e341b0537e8942f947b0a30310f74c665d1d upstream. The commit introduces another bug. Cc: stable@vger.kernel.org Fixes: 7f99bb763b967 ("f2fs: fix to do sanity check on summary info") Signed-off-by: Pavel Machek Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/gc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 420591654ca0e..ef71d9cda5851 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -643,6 +643,7 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, if (ofs_in_node >= max_addrs) { f2fs_err(sbi, "Inconsistent ofs_in_node:%u in summary, ino:%u, nid:%u, max:%u", ofs_in_node, dni->ino, dni->nid, max_addrs); + f2fs_put_page(node_page, 1); return false; } -- 2.39.5