Skip to contentSkip to conversation

f2fs: fix to return -EFSCORRUPTED in f2fs_get_node_info() correctly

PATCH Applied Chao Yu 2 participants 2 messages Aug 5 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: fix to return -EFSCORRUPTED in f2fs_get_node_info() correctly

Otherwise, it will cache wrong nat info in cache.

Fixes 3cb396a2c790 ("f2fs: fix to do sanity check on nat entry of quota inode")
---
 fs/f2fs/node.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/node.c +1 -0
index 38917e4a7319..9775fa90636a 100644
@@ -660,6 +660,7 @@ int f2fs_get_node_info(struct f2fs_sb_info *sbi, nid_t nid,
 			__builtin_return_address(0),
 			ni->ino, ni->nid, ni->blk_addr, ni->version, ni->flag);
 		f2fs_handle_error(sbi, ERROR_INCONSISTENT_NAT);
+		return -EFSCORRUPTED;
 	}
 
 	/* cache nat entry */
Signature · 1 line
2.49.0
#1 lore raw
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 Wed, 5 Aug 2026 12:20:08 +0000 you wrote:

Otherwise, it will cache wrong nat info in cache.

Fixes 3cb396a2c790 ("f2fs: fix to do sanity check on nat entry of quota inode")
---
 fs/f2fs/node.c | 1 +
 1 file changed, 1 insertion(+)

Here is the summary with links:
- [f2fs-dev] f2fs: fix to return -EFSCORRUPTED in f2fs_get_node_info() correctly

    https://git.kernel.org/jaegeuk/f2fs/c/026d7aeadf27

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html