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
@ -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;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user