f2fs: should put a page when checking the summary info
authorPavel Machek <pavel@denx.de>
Mon, 24 Oct 2022 17:30:12 +0000 (19:30 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 25 Oct 2022 17:44:21 +0000 (10:44 -0700)
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 <pavel@denx.de>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c

index 4546e01..dab7942 100644 (file)
@@ -1110,6 +1110,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;
        }