ext4: use ext4_group_first_block_no()

Use ext4_group_first_block_no() and assign the return values to
ext4_fsblk_t variables.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: adilger@clusterfs.com
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mingming Cao <cmm@us.ibm.com>
This commit is contained in:
Akinobu Mita
2008-04-17 10:38:59 -04:00
committed by Theodore Ts'o
parent 216c34b2b8
commit d00a6d7b40
2 changed files with 5 additions and 7 deletions

View File

@@ -806,10 +806,8 @@ inserted:
get_bh(new_bh);
} else {
/* We need to allocate a new block */
ext4_fsblk_t goal = le32_to_cpu(
EXT4_SB(sb)->s_es->s_first_data_block) +
(ext4_fsblk_t)EXT4_I(inode)->i_block_group *
EXT4_BLOCKS_PER_GROUP(sb);
ext4_fsblk_t goal = ext4_group_first_block_no(sb,
EXT4_I(inode)->i_block_group);
ext4_fsblk_t block = ext4_new_block(handle, inode,
goal, &error);
if (error)