summaryrefslogtreecommitdiffstats
path: root/fs/ext2/balloc.c
diff options
context:
space:
mode:
authorAkinobu Mita2008-02-06 10:40:17 +0100
committerLinus Torvalds2008-02-06 19:41:21 +0100
commit859cb93679929edb88642414bf37789ea263bc47 (patch)
tree3dcc640e2d1fcd7b661336efcd22ef4d3104bb03 /fs/ext2/balloc.c
parentext[234]: remove unused argument for ext[234]_find_goal() (diff)
downloadkernel-qcow2-linux-859cb93679929edb88642414bf37789ea263bc47.tar.gz
kernel-qcow2-linux-859cb93679929edb88642414bf37789ea263bc47.tar.xz
kernel-qcow2-linux-859cb93679929edb88642414bf37789ea263bc47.zip
ext[234]: cleanup ext[234]_bg_num_gdb()
Use ext[234]_bg_has_super() to remove duplicate code. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext2/balloc.c')
-rw-r--r--fs/ext2/balloc.c5
1 files changed, 1 insertions, 4 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)
*/
unsigned long ext2_bg_num_gdb(struct super_block *sb, int group)
{
- if (EXT2_HAS_RO_COMPAT_FEATURE(sb,EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)&&
- !ext2_group_sparse(group))
- return 0;
- return EXT2_SB(sb)->s_gdb_count;
+ return ext2_bg_has_super(sb, group) ? EXT2_SB(sb)->s_gdb_count : 0;
}