diff options
author | Chao Yu <chao@kernel.org> | 2024-05-21 14:23:18 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-06-12 15:46:02 +0000 |
commit | c240c87bcd44a1a2375fc8ef8c645d1f1fe76466 (patch) | |
tree | 008aabf5b080ca2c9e46774a332b8153331daf39 /fs/f2fs/inode.c | |
parent | fc01008c92f40015aeeced94750855a7111b6929 (diff) | |
download | linux-c240c87bcd44a1a2375fc8ef8c645d1f1fe76466.tar.gz linux-c240c87bcd44a1a2375fc8ef8c645d1f1fe76466.tar.bz2 linux-c240c87bcd44a1a2375fc8ef8c645d1f1fe76466.zip |
f2fs: fix to do sanity check on blocks for inline_data inode
inode can be fuzzed, so it can has F2FS_INLINE_DATA flag and valid
i_blocks/i_nid value, this patch supports to do extra sanity check
to detect such corrupted state.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 005dde72aff3..33b2778d5452 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -344,7 +344,7 @@ static bool sanity_check_inode(struct inode *inode, struct page *node_page) } } - if (f2fs_sanity_check_inline_data(inode)) { + if (f2fs_sanity_check_inline_data(inode, node_page)) { f2fs_warn(sbi, "%s: inode (ino=%lx, mode=%u) should not have inline_data, run fsck to fix", __func__, inode->i_ino, inode->i_mode); return false; |