diff options
author | Ryusuke Konishi <konishi.ryusuke@gmail.com> | 2023-01-27 01:41:14 +0900 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-02 22:50:08 -0800 |
commit | 5124a0a549857c4b87173280e192eea24dea72ad (patch) | |
tree | b73bb59101b8f0f8e04c550c3a31aaf9e9561304 /fs/nilfs2/super.c | |
parent | 1b381f6fe495fffbbdace1ee530afb74287c809d (diff) | |
download | lwn-5124a0a549857c4b87173280e192eea24dea72ad.tar.gz lwn-5124a0a549857c4b87173280e192eea24dea72ad.zip |
nilfs2: replace WARN_ONs for invalid DAT metadata block requests
If DAT metadata file block access fails due to corruption of the DAT file
or abnormal virtual block numbers held by b-trees or inodes, a kernel
warning is generated.
This replaces the WARN_ONs by error output, so that a kernel, booted with
panic_on_warn, does not panic. This patch also replaces the detected
return code -ENOENT with another internal code -EINVAL to notify the bmap
layer of metadata corruption. When the bmap layer sees -EINVAL, it
handles the abnormal situation with nilfs_bmap_convert_error() and finally
returns code -EIO as it should.
Link: https://lkml.kernel.org/r/0000000000005cc3d205ea23ddcf@google.com
Link: https://lkml.kernel.org/r/20230126164114.6911-1-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: <syzbot+5d5d25f90f195a3cfcb4@syzkaller.appspotmail.com>
Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/super.c')
0 files changed, 0 insertions, 0 deletions