From 3a5b2ecdd1fa63a8f25bd769223bc1c2564ce45d Mon Sep 17 00:00:00 2001 From: Mingming Cao Date: Wed, 11 Oct 2006 01:21:05 -0700 Subject: [PATCH] ext4: switch fsblk to sector_t Redefine ext3 in-kernel filesystem block type (ext3_fsblk_t) from unsigned long to sector_t, to allow kernel to handle >32 bit ext3 blocks. Signed-off-by: Mingming Cao Signed-off-by: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ext4/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/ext4/super.c') diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 69f87525..1d12e4f 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1433,8 +1433,8 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) * block sizes. We need to calculate the offset from buffer start. */ if (blocksize != EXT4_MIN_BLOCK_SIZE) { - logic_sb_block = (sb_block * EXT4_MIN_BLOCK_SIZE) / blocksize; - offset = (sb_block * EXT4_MIN_BLOCK_SIZE) % blocksize; + logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; + offset = sector_div(logic_sb_block, blocksize); } else { logic_sb_block = sb_block; } @@ -1539,8 +1539,8 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) brelse (bh); sb_set_blocksize(sb, blocksize); - logic_sb_block = (sb_block * EXT4_MIN_BLOCK_SIZE) / blocksize; - offset = (sb_block * EXT4_MIN_BLOCK_SIZE) % blocksize; + logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; + offset = sector_div(logic_sb_block, blocksize); bh = sb_bread(sb, logic_sb_block); if (!bh) { printk(KERN_ERR -- cgit v1.1