diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/mballoc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index c3af9e6b666..dbd47eac13e 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -1728,7 +1728,6 @@ static int ext4_mb_good_group(struct ext4_allocation_context *ac, | |||
1728 | unsigned free, fragments; | 1728 | unsigned free, fragments; |
1729 | unsigned i, bits; | 1729 | unsigned i, bits; |
1730 | int flex_size = ext4_flex_bg_size(EXT4_SB(ac->ac_sb)); | 1730 | int flex_size = ext4_flex_bg_size(EXT4_SB(ac->ac_sb)); |
1731 | struct ext4_group_desc *desc; | ||
1732 | struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); | 1731 | struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); |
1733 | 1732 | ||
1734 | BUG_ON(cr < 0 || cr >= 4); | 1733 | BUG_ON(cr < 0 || cr >= 4); |
@@ -1744,10 +1743,6 @@ static int ext4_mb_good_group(struct ext4_allocation_context *ac, | |||
1744 | switch (cr) { | 1743 | switch (cr) { |
1745 | case 0: | 1744 | case 0: |
1746 | BUG_ON(ac->ac_2order == 0); | 1745 | BUG_ON(ac->ac_2order == 0); |
1747 | /* If this group is uninitialized, skip it initially */ | ||
1748 | desc = ext4_get_group_desc(ac->ac_sb, group, NULL); | ||
1749 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) | ||
1750 | return 0; | ||
1751 | 1746 | ||
1752 | /* Avoid using the first bg of a flexgroup for data files */ | 1747 | /* Avoid using the first bg of a flexgroup for data files */ |
1753 | if ((ac->ac_flags & EXT4_MB_HINT_DATA) && | 1748 | if ((ac->ac_flags & EXT4_MB_HINT_DATA) && |
@@ -2067,9 +2062,7 @@ repeat: | |||
2067 | 2062 | ||
2068 | ac->ac_groups_scanned++; | 2063 | ac->ac_groups_scanned++; |
2069 | desc = ext4_get_group_desc(sb, group, NULL); | 2064 | desc = ext4_get_group_desc(sb, group, NULL); |
2070 | if (cr == 0 || (desc->bg_flags & | 2065 | if (cr == 0) |
2071 | cpu_to_le16(EXT4_BG_BLOCK_UNINIT) && | ||
2072 | ac->ac_2order != 0)) | ||
2073 | ext4_mb_simple_scan_group(ac, &e4b); | 2066 | ext4_mb_simple_scan_group(ac, &e4b); |
2074 | else if (cr == 1 && | 2067 | else if (cr == 1 && |
2075 | ac->ac_g_ex.fe_len == sbi->s_stripe) | 2068 | ac->ac_g_ex.fe_len == sbi->s_stripe) |