From: Pavel Machek Date: Mon, 24 Oct 2022 17:30:12 +0000 (+0200) Subject: f2fs: should put a page when checking the summary info X-Git-Tag: v6.0.17~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9035f42b8f4aea2b8f0468e26a1c6ced9ef8aa2b;p=thirdparty%2Fkernel%2Fstable.git f2fs: should put a page when checking the summary info commit c3db3c2fd9992c08f49aa93752d3c103c3a4f6aa upstream. The commit introduces another bug. Cc: stable@vger.kernel.org Fixes: c6ad7fd16657e ("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 --- diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 68eb1d33128be..d58100dc6e898 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1109,6 +1109,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; }