[PATCH 2/2] f2fs: fix to call f2fs_commit_super() correctly

From: Chao Yu

Date: Fri Oct 23 2026 - 08:42:18 EST


From: Chao Yu <chao@xxxxxxxxxx>

This patch fixes the bug reported by Sashiko:

We should call f2fs_commit_super() instead of __f2fs_commit_super() in
sanity_check_area_boundary() to update chksum valud along w/
raw_super->segment_count.

Cc: stable@xxxxxxxxxx
Fixes: d440c52d3151 ("f2fs: support superblock checksum")
Signed-off-by: Chao Yu <chao@xxxxxxxxxx>
---
fs/f2fs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b321b9cff351..da1e4bc8a64f 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4090,12 +4090,12 @@ static inline bool sanity_check_area_boundary(struct f2fs_sb_info *sbi,
res = "internally";
} else {
/*
- * __f2fs_commit_super() will access log_blocksize
+ * f2fs_commit_super() will access log_blocksize
* in SECTOR_FROM_BLOCK(), init it in advance.
*/
sbi->log_blocksize =
le32_to_cpu(raw_super->log_blocksize);
- err = __f2fs_commit_super(sbi, folio, index, false);
+ err = f2fs_commit_super(sbi, false);
res = err ? "failed" : "done";
}
f2fs_info(sbi, "Fix alignment : %s, start(%u) end(%llu) block(%u)",
--
2.49.0