summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-02-19 18:10:33 +0100
committerTheodore Ts'o <tytso@mit.edu>2024-03-07 13:32:54 -0500
commit40da553f5da020931e9cddf02948847a188c5223 (patch)
treee6237af6ed5878dce9a8e8ad2e3ecc272b1c1e83 /fs/ext4/ialloc.c
parenta6b3bfe176e8a5b05ec4447404e412c2a3fc92cc (diff)
downloadlinux-40da553f5da020931e9cddf02948847a188c5223.tar.gz
linux-40da553f5da020931e9cddf02948847a188c5223.tar.bz2
linux-40da553f5da020931e9cddf02948847a188c5223.zip
ext4: verify s_clusters_per_group even without bigalloc
Currently we ignore s_clusters_per_group field in the on-disk superblock if bigalloc feature is not enabled. However e2fsprogs don't even open the filesystem if s_clusters_per_group is invalid. This results in an odd state where kernel happily works with the filesystem while even e2fsck refuses to touch it. Verify that s_clusters_per_group is valid even if bigalloc feature is not enabled to make things consistent. Due to current e2fsprogs behavior it is unlikely there are filesystems out in the wild (except for intentionally fuzzed ones) with invalid s_clusters_per_group counts. Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Link: https://lore.kernel.org/r/20240219171033.22882-1-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
0 files changed, 0 insertions, 0 deletions