[RHEL7,COMMIT] ms/ext4: Actually request zeroing of inode table after grow

Submitted by Konstantin Khorenko on April 22, 2019, 3:14 p.m.

Details

Message ID 201904221513.x3MFDwdV021604@finist-ce7.sw.ru
State New
Series "ext4: Actually request zeroing of inode table after grow"
Headers show

Commit Message

Konstantin Khorenko April 22, 2019, 3:14 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.94.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.94.17
------>
commit 7fded4f7cd9986161a9abc712e9f7d770c1bbb92
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Mon Apr 22 18:13:57 2019 +0300

    ms/ext4: Actually request zeroing of inode table after grow
    
    [This is reviewed and goes to ms]
    
    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.
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 5f55938ae9cc..5c48b00dd8e3 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -644,7 +644,7 @@  long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		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);