kernel_optimize_test/fs/ext4
Zhang Yi 098b257563 ext4: fix check to prevent false positive report of incorrect used inodes
commit a149d2a5cabbf6507a7832a1c4fd2593c55fd450 upstream.

Commit <50122847007> ("ext4: fix check to prevent initializing reserved
inodes") check the block group zero and prevent initializing reserved
inodes. But in some special cases, the reserved inode may not all belong
to the group zero, it may exist into the second group if we format
filesystem below.

  mkfs.ext4 -b 4096 -g 8192 -N 1024 -I 4096 /dev/sda

So, it will end up triggering a false positive report of a corrupted
file system. This patch fix it by avoid check reserved inodes if no free
inode blocks will be zeroed.

Cc: stable@kernel.org
Fixes: 5012284700 ("ext4: fix check to prevent initializing reserved inodes")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Suggested-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210331121516.2243099-1-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-11 14:47:37 +02:00
..
acl.c
acl.h
balloc.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 15:00:03 +02:00
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 15:00:03 +02:00
extents_status.c
extents_status.h
extents.c
fast_commit.c
fast_commit.h
file.c
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c ext4: fix check to prevent false positive report of incorrect used inodes 2021-05-11 14:47:37 +02:00
indirect.c
inline.c
inode-test.c
inode.c ext4: fix bh ref count on error paths 2021-04-07 15:00:03 +02:00
ioctl.c
Kconfig
Makefile
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4: do not iput inode under running transaction in ext4_rename() 2021-04-07 15:00:06 +02:00
page-io.c
readpage.c
resize.c
super.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 15:00:03 +02:00
symlink.c
sysfs.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 15:00:03 +02:00
truncate.h
verity.c
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h