From: Vasily Averin Date: Tue, 6 Nov 2018 21:16:01 +0000 (-0500) Subject: ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65b1ce496c490e74b88f6fafc84a3eed756807a4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing commit f348e2241fb73515d65b5d77dd9c174128a7fbf2 upstream. Fixes: 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.7 Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 075738830b87..c2cbd21bf023 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -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)