aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 69f875250500..1d12e4f7d69f 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)
1433 * block sizes. We need to calculate the offset from buffer start. 1433 * block sizes. We need to calculate the offset from buffer start.
1434 */ 1434 */
1435 if (blocksize != EXT4_MIN_BLOCK_SIZE) { 1435 if (blocksize != EXT4_MIN_BLOCK_SIZE) {
1436 logic_sb_block = (sb_block * EXT4_MIN_BLOCK_SIZE) / blocksize; 1436 logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
1437 offset = (sb_block * EXT4_MIN_BLOCK_SIZE) % blocksize; 1437 offset = sector_div(logic_sb_block, blocksize);
1438 } else { 1438 } else {
1439 logic_sb_block = sb_block; 1439 logic_sb_block = sb_block;
1440 } 1440 }
@@ -1539,8 +1539,8 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
1539 1539
1540 brelse (bh); 1540 brelse (bh);
1541 sb_set_blocksize(sb, blocksize); 1541 sb_set_blocksize(sb, blocksize);
1542 logic_sb_block = (sb_block * EXT4_MIN_BLOCK_SIZE) / blocksize; 1542 logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
1543 offset = (sb_block * EXT4_MIN_BLOCK_SIZE) % blocksize; 1543 offset = sector_div(logic_sb_block, blocksize);
1544 bh = sb_bread(sb, logic_sb_block); 1544 bh = sb_bread(sb, logic_sb_block);
1545 if (!bh) { 1545 if (!bh) {
1546 printk(KERN_ERR 1546 printk(KERN_ERR