ext[234]: cleanup ext[234]_bg_num_gdb()
[firefly-linux-kernel-4.4.55.git] / fs / ext3 / balloc.c
index 245949ead658953f1967776782a8f59a46a04ffa..a75713031105159ab82472301be86abef9ccc0af 100644 (file)
@@ -1848,11 +1848,7 @@ static unsigned long ext3_bg_num_gdb_meta(struct super_block *sb, int group)
 
 static unsigned long ext3_bg_num_gdb_nometa(struct super_block *sb, int group)
 {
-       if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
-                               EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER) &&
-                       !ext3_group_sparse(group))
-               return 0;
-       return EXT3_SB(sb)->s_gdb_count;
+       return ext3_bg_has_super(sb, group) ? EXT3_SB(sb)->s_gdb_count : 0;
 }
 
 /**