summaryrefslogtreecommitdiff
path: root/fs/ext4/extents.c
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/extents.c
parent9b1d0998d24f9c207d5fbdd0b8bac07284e0eda7 (diff)
downloadlinux-3.10-5661bd6861b7490394e29aaf74dca812188272e4.tar.gz
linux-3.10-5661bd6861b7490394e29aaf74dca812188272e4.tar.bz2
linux-3.10-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/extents.c')
-rw-r--r--fs/ext4/extents.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 4bb69206f17..3c0bae11a09 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -195,8 +195,7 @@ static ext4_fsblk_t ext4_ext_find_goal(struct inode *inode,
if (S_ISREG(inode->i_mode))
block_group++;
}
- bg_start = (block_group * EXT4_BLOCKS_PER_GROUP(inode->i_sb)) +
- le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_first_data_block);
+ bg_start = ext4_group_first_block_no(inode->i_sb, block_group);
last_block = ext4_blocks_count(EXT4_SB(inode->i_sb)->s_es) - 1;
/*