diff options
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index d4ca92aab514..8662b2e6e9f9 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1673,14 +1673,14 @@ static int ext4_fill_flex_info(struct super_block *sb) | |||
1673 | size_t size; | 1673 | size_t size; |
1674 | int i; | 1674 | int i; |
1675 | 1675 | ||
1676 | if (!sbi->s_es->s_log_groups_per_flex) { | 1676 | sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; |
1677 | groups_per_flex = 1 << sbi->s_log_groups_per_flex; | ||
1678 | |||
1679 | if (groups_per_flex < 2) { | ||
1677 | sbi->s_log_groups_per_flex = 0; | 1680 | sbi->s_log_groups_per_flex = 0; |
1678 | return 1; | 1681 | return 1; |
1679 | } | 1682 | } |
1680 | 1683 | ||
1681 | sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; | ||
1682 | groups_per_flex = 1 << sbi->s_log_groups_per_flex; | ||
1683 | |||
1684 | /* We allocate both existing and potentially added groups */ | 1684 | /* We allocate both existing and potentially added groups */ |
1685 | flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) + | 1685 | flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) + |
1686 | ((le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks) + 1) << | 1686 | ((le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks) + 1) << |