diff options
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r-- | fs/ext4/balloc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 1d0418980f8d..f3032c919a22 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -761,7 +761,13 @@ static unsigned long ext4_bg_num_gdb_meta(struct super_block *sb, | |||
761 | static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, | 761 | static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, |
762 | ext4_group_t group) | 762 | ext4_group_t group) |
763 | { | 763 | { |
764 | return ext4_bg_has_super(sb, group) ? EXT4_SB(sb)->s_gdb_count : 0; | 764 | if (!ext4_bg_has_super(sb, group)) |
765 | return 0; | ||
766 | |||
767 | if (EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG)) | ||
768 | return le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); | ||
769 | else | ||
770 | return EXT4_SB(sb)->s_gdb_count; | ||
765 | } | 771 | } |
766 | 772 | ||
767 | /** | 773 | /** |