ext4: cleanup to use ext4_group_first_block_no()
This is a cleanup and simplification patch which takes some open-coded calculations to calculate the first block number of a group and converts them to use the (already defined) ext4_group_first_block_no() function. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Dilger <adilger@sun.com>
This commit is contained in:
committed by
Theodore Ts'o
parent
9b1d0998d2
commit
5661bd6861
@@ -130,8 +130,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
|
||||
* to make sure we calculate the right free blocks
|
||||
*/
|
||||
group_blocks = ext4_blocks_count(sbi->s_es) -
|
||||
le32_to_cpu(sbi->s_es->s_first_data_block) -
|
||||
(EXT4_BLOCKS_PER_GROUP(sb) * (ngroups - 1));
|
||||
ext4_group_first_block_no(sb, ngroups - 1);
|
||||
} else {
|
||||
group_blocks = EXT4_BLOCKS_PER_GROUP(sb);
|
||||
}
|
||||
|
Reference in New Issue
Block a user