diff options
author | Akinobu Mita | 2010-03-03 23:53:39 -0500 |
---|---|---|
committer | Theodore Ts'o | 2010-03-03 23:53:39 -0500 |
commit | 5661bd6861b7490394e29aaf74dca812188272e4 (patch) | |
tree | 34d4e626b9c4abaf98e79fb705ba1e4a21f9e7f9 /fs/ext4/balloc.c | |
parent | 9b1d0998d24f9c207d5fbdd0b8bac07284e0eda7 (diff) |
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>
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r-- | fs/ext4/balloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 720061a0ee53..fadbc4d3a202 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -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); } |