ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing
authorVasily Averin <vvs@virtuozzo.com>
Tue, 6 Nov 2018 21:16:01 +0000 (16:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:24:12 +0000 (09:24 +0100)
commit f348e2241fb73515d65b5d77dd9c174128a7fbf2 upstream.

Fixes: 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 3.7
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/resize.c

index 075738830b879be81c8136729d5136a2d9295c8d..c2cbd21bf023a2b9987cb740d3b9f8ec84eb4691 100644 (file)
@@ -1992,7 +1992,7 @@ retry:
 
        err = ext4_alloc_flex_bg_array(sb, n_group + 1);
        if (err)
-               return err;
+               goto out;
 
        err = ext4_mb_alloc_groupinfo(sb, n_group + 1);
        if (err)