• Theodore Ts'o's avatar
    ext4: fix false negatives *and* false positives in ext4_check_descriptors() · 44de022c
    Theodore Ts'o authored
    Ext4_check_descriptors() was getting called before s_gdb_count was
    initialized.  So for file systems w/o the meta_bg feature, allocation
    bitmaps could overlap the block group descriptors and ext4 wouldn't
    notice.
    
    For file systems with the meta_bg feature enabled, there was a
    fencepost error which would cause the ext4_check_descriptors() to
    incorrectly believe that the block allocation bitmap overlaps with the
    block group descriptor blocks, and it would reject the mount.
    
    Fix both of these problems.
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    Cc: stable@vger.kernel.org
    44de022c
super.c 169 KB