f2fs: fix to pass folio->index to f2fs_sanity_check_node_footer()
Chao Yu
maintainerPATCH 1/1 f2fs: fix to pass folio->index to f2fs_sanity_check_node_footer()
Otherwise in f2fs_sanity_check_node_footer(), it will check the same nid incorrectly.
Fixes 0a736109c9d2 ("f2fs: fix to do sanity check on node footer in __write_node_folio()")
Signed-off-by Chao Yu <[email protected]>
--- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/node.c +1 -1
@@ -1790,7 +1790,7 @@ static bool __write_node_folio(struct folio *folio, bool atomic, bool do_fsync,/* get old block addr of this node page */ nid =nid_of_node (folio); -if (f2fs_sanity_check_node_footer (sbi, folio, nid, +if (f2fs_sanity_check_node_footer (sbi, folio, folio->index,NODE_TYPE_REGULAR , false)) {fserror_report_metadata (sbi->sb, -EFSCORRUPTED ,GFP_NOFS );f2fs_stop_checkpoint (sbi, false,STOP_CP_REASON_CORRUPTED_NID );
Signature · 1 line
2.49.0
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:
Quoted 8 lines · On Thu, 6 Aug 2026 20:35:37 +0800 you wrote:
Otherwise in
f2fs_sanity_check_node_footer(), it will check the same nid incorrectly.Fixes 0a736109c9d2 ("f2fs: fix to do sanity check on node footer in __write_node_folio()")Signed-off-by Chao Yu <[email protected]>[...]
Here is the summary with links:
- [f2fs-dev] f2fs: fix to pass folio->index to f2fs_sanity_check_node_footer()
https://git.kernel.org/jaegeuk/f2fs/c/7e188e9f9437
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html