summaryrefslogtreecommitdiff
path: root/lib/ext2fs/closefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs/closefs.c')
-rw-r--r--lib/ext2fs/closefs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index 952f4966..51ef63cb 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -152,14 +152,7 @@ int ext2fs_super_and_bgd_loc(ext2_filsys fs,
&ret_new_desc_blk2,
&ret_used_blks);
- if (group == fs->group_desc_count-1) {
- numblocks = (ext2fs_blocks_count(fs->super) -
- (blk64_t) fs->super->s_first_data_block) %
- (blk64_t) fs->super->s_blocks_per_group;
- if (!numblocks)
- numblocks = fs->super->s_blocks_per_group;
- } else
- numblocks = fs->super->s_blocks_per_group;
+ numblocks = ext2fs_group_blocks_count(fs, group);
if (ret_super_blk)
*ret_super_blk = (blk_t)ret_super_blk2;