summaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2010-03-03 23:53:39 -0500
committerTheodore Ts'o <tytso@mit.edu>2010-03-03 23:53:39 -0500
commit5661bd6861b7490394e29aaf74dca812188272e4 (patch)
tree34d4e626b9c4abaf98e79fb705ba1e4a21f9e7f9 /fs/ext4/mballoc.h
parent9b1d0998d24f9c207d5fbdd0b8bac07284e0eda7 (diff)
downloadlinux-5661bd6861b7490394e29aaf74dca812188272e4.tar.gz
linux-5661bd6861b7490394e29aaf74dca812188272e4.tar.bz2
linux-5661bd6861b7490394e29aaf74dca812188272e4.zip
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/mballoc.h')
-rw-r--r--fs/ext4/mballoc.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h
index 436521cae456..9b2deed652b7 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