aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext2/balloc.c5
-rw-r--r--fs/ext3/balloc.c6
-rw-r--r--fs/ext4/balloc.c6
3 files changed, 3 insertions, 14 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index f86207b345a9..e7b2bafa1dd9 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -1533,9 +1533,6 @@ int ext2_bg_has_super(struct super_block *sb, int group)
1533 */ 1533 */
1534unsigned long ext2_bg_num_gdb(struct super_block *sb, int group) 1534unsigned long ext2_bg_num_gdb(struct super_block *sb, int group)
1535{ 1535{
1536 if (EXT2_HAS_RO_COMPAT_FEATURE(sb,EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)&& 1536 return ext2_bg_has_super(sb, group) ? EXT2_SB(sb)->s_gdb_count : 0;
1537 !ext2_group_sparse(group))
1538 return 0;
1539 return EXT2_SB(sb)->s_gdb_count;
1540} 1537}
1541 1538
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 245949ead658..a75713031105 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -1848,11 +1848,7 @@ static unsigned long ext3_bg_num_gdb_meta(struct super_block *sb, int group)
1848 1848
1849static unsigned long ext3_bg_num_gdb_nometa(struct super_block *sb, int group) 1849static unsigned long ext3_bg_num_gdb_nometa(struct super_block *sb, int group)
1850{ 1850{
1851 if (EXT3_HAS_RO_COMPAT_FEATURE(sb, 1851 return ext3_bg_has_super(sb, group) ? EXT3_SB(sb)->s_gdb_count : 0;
1852 EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER) &&
1853 !ext3_group_sparse(group))
1854 return 0;
1855 return EXT3_SB(sb)->s_gdb_count;
1856} 1852}
1857 1853
1858/** 1854/**
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 7b42cc18ef8c..0737e05ba3dd 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -2011,11 +2011,7 @@ static unsigned long ext4_bg_num_gdb_meta(struct super_block *sb,
2011static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, 2011static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb,
2012 ext4_group_t group) 2012 ext4_group_t group)
2013{ 2013{
2014 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, 2014 return ext4_bg_has_super(sb, group) ? EXT4_SB(sb)->s_gdb_count : 0;
2015 EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER) &&
2016 !ext4_group_sparse(group))
2017 return 0;
2018 return EXT4_SB(sb)->s_gdb_count;
2019} 2015}
2020 2016
2021/** 2017/**