tmp_suning_uos_patched/fs/ext4
Theodore Ts'o 5012284700 ext4: fix check to prevent initializing reserved inodes
Commit 8844618d8aa7: "ext4: only look at the bg_flags field if it is
valid" will complain if block group zero does not have the
EXT4_BG_INODE_ZEROED flag set.  Unfortunately, this is not correct,
since a freshly created file system has this flag cleared.  It gets
almost immediately after the file system is mounted read-write --- but
the following somewhat unlikely sequence will end up triggering a
false positive report of a corrupted file system:

   mkfs.ext4 /dev/vdc
   mount -o ro /dev/vdc /vdc
   mount -o remount,rw /dev/vdc

Instead, when initializing the inode table for block group zero, test
to make sure that itable_unused count is not too large, since that is
the case that will result in some or all of the reserved inodes
getting cleared.

This fixes the failures reported by Eric Whiteney when running
generic/230 and generic/231 in the the nojournal test case.

Fixes: 8844618d8a ("ext4: only look at the bg_flags field if it is valid")
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-29 15:34:00 -04:00
..
acl.c
acl.h
balloc.c ext4: check for allocation block validity with block group locked 2018-07-12 19:08:05 -04:00
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h Bug fixes for ext4; most of which relate to vulnerabilities where a 2018-07-08 11:10:30 -07:00
extents_status.c
extents_status.h
extents.c Bug fixes for ext4; most of which relate to vulnerabilities where a 2018-07-08 11:10:30 -07:00
file.c
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c ext4: fix check to prevent initializing reserved inodes 2018-07-29 15:34:00 -04:00
indirect.c
inline.c ext4: fix inline data updates with checksums enabled 2018-07-10 01:07:43 -04:00
inode.c ext4: fix inline data updates with checksums enabled 2018-07-10 01:07:43 -04:00
ioctl.c
Kconfig
Makefile
mballoc.c Bug fixes for ext4; most of which relate to vulnerabilities where a 2018-07-08 11:10:30 -07:00
mballoc.h
migrate.c
mmp.c ext4: clear mmp sequence number when remounting read-only 2018-07-08 19:36:02 -04:00
move_extent.c
namei.c
page-io.c
readpage.c
resize.c
super.c ext4: fix check to prevent initializing reserved inodes 2018-07-29 15:34:00 -04:00
symlink.c
sysfs.c
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: avoid running out of journal credits when appending to an inline file 2018-06-16 23:41:59 -04:00
xattr.h