From 5661bd6861b7490394e29aaf74dca812188272e4 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 3 Mar 2010 23:53:39 -0500 Subject: 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 Signed-off-by: "Theodore Ts'o" Cc: Andreas Dilger --- fs/ext4/mballoc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'fs/ext4/mballoc.h') diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 436521c..9b2deed 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -225,11 +225,6 @@ struct ext4_buddy { static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb, struct ext4_free_extent *fex) { - ext4_fsblk_t block; - - block = (ext4_fsblk_t) fex->fe_group * EXT4_BLOCKS_PER_GROUP(sb) - + fex->fe_start - + le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block); - return block; + return ext4_group_first_block_no(sb, fex->fe_group) + fex->fe_start; } #endif -- cgit v1.1