summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPavel Machek <pavel@denx.de>2022-10-24 20:30:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-14 12:16:27 +0300
commit252a720882807fb29c085ff286867c5c63167569 (patch)
treeec24aea919f8e1c92d9a453bd0749a3a637aa8a9 /fs
parent882734bbc5873143b17292cd29504bda9142d565 (diff)
downloadlinux-252a720882807fb29c085ff286867c5c63167569.tar.xz
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 <pavel@denx.de> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/gc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 89156568a4fb..ce6a2a247804 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1008,6 +1008,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;
}