aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 072ff973ff2..10290f8f592 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1930,14 +1930,13 @@ static int ext4_fill_flex_info(struct super_block *sb)
1930 size = flex_group_count * sizeof(struct flex_groups); 1930 size = flex_group_count * sizeof(struct flex_groups);
1931 sbi->s_flex_groups = kzalloc(size, GFP_KERNEL); 1931 sbi->s_flex_groups = kzalloc(size, GFP_KERNEL);
1932 if (sbi->s_flex_groups == NULL) { 1932 if (sbi->s_flex_groups == NULL) {
1933 sbi->s_flex_groups = vmalloc(size); 1933 sbi->s_flex_groups = vzalloc(size);
1934 if (sbi->s_flex_groups) 1934 if (sbi->s_flex_groups == NULL) {
1935 memset(sbi->s_flex_groups, 0, size); 1935 ext4_msg(sb, KERN_ERR,
1936 } 1936 "not enough memory for %u flex groups",
1937 if (sbi->s_flex_groups == NULL) { 1937 flex_group_count);
1938 ext4_msg(sb, KERN_ERR, "not enough memory for " 1938 goto failed;
1939 "%u flex groups", flex_group_count); 1939 }
1940 goto failed;
1941 } 1940 }
1942 1941
1943 for (i = 0; i < sbi->s_groups_count; i++) { 1942 for (i = 0; i < sbi->s_groups_count; i++) {