]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ext4: actually request zeroing of inode table after grow
authorKirill Tkhai <ktkhai@virtuozzo.com>
Thu, 25 Apr 2019 17:06:18 +0000 (13:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 25 Apr 2019 17:06:18 +0000 (13:06 -0400)
It is never possible, that number of block groups decreases,
since only online grow is supported.

But after a growing occured, we have to zero inode tables
for just created new block groups.

Fixes: fc84198bd5f2 ("ext4: add new online resize interface")
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@kernel.org
fs/ext4/ioctl.c

index bab3da4f1e0d36692fa172b6724379baa47bb2d6..20faa6a69238b7fb0819d3d17b3156432e283c64 100644 (file)
@@ -978,7 +978,7 @@ mext_out:
                if (err == 0)
                        err = err2;
                mnt_drop_write_file(filp);
-               if (!err && (o_group > EXT4_SB(sb)->s_groups_count) &&
+               if (!err && (o_group < EXT4_SB(sb)->s_groups_count) &&
                    ext4_has_group_desc_csum(sb) &&
                    test_opt(sb, INIT_INODE_TABLE))
                        err = ext4_register_li_request(sb, o_group);