Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39310
b: refs/heads/master
c: f4e5bc2
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 11, 2006
1 parent aa8fc9f commit c38155d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72b64b594081ef0a0717f6aad77e891c72ed4afa
refs/heads/master: f4e5bc244f23ee024a4dfa034b591b219b2bfb8f
2 changes: 1 addition & 1 deletion trunk/fs/ext4/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
ext4_grpblk_t offset;

blocknr = blocknr - le32_to_cpu(es->s_first_data_block);
offset = sector_div(blocknr, EXT4_BLOCKS_PER_GROUP(sb));
offset = do_div(blocknr, EXT4_BLOCKS_PER_GROUP(sb));
if (offsetp)
*offsetp = offset;
if (blockgrpp)
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/ext4/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
avefreei = freei / ngroups;
freeb = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
avefreeb = freeb;
sector_div(avefreeb, ngroups);
do_div(avefreeb, ngroups);
ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);

if ((parent == sb->s_root->d_inode) ||
Expand Down Expand Up @@ -305,14 +305,14 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
}

blocks_per_dir = ext4_blocks_count(es) - freeb;
sector_div(blocks_per_dir, ndirs);
do_div(blocks_per_dir, ndirs);

max_dirs = ndirs / ngroups + inodes_per_group / 16;
min_inodes = avefreei - inodes_per_group / 4;
min_blocks = avefreeb - EXT4_BLOCKS_PER_GROUP(sb) / 4;

max_debt = EXT4_BLOCKS_PER_GROUP(sb);
sector_div(max_debt, max(blocks_per_dir, (ext4_fsblk_t)BLOCK_COST));
max_debt /= max_t(int, blocks_per_dir, BLOCK_COST);
if (max_debt * INODE_COST > inodes_per_group)
max_debt = inodes_per_group / INODE_COST;
if (max_debt > 255)
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
*/
if (blocksize != EXT4_MIN_BLOCK_SIZE) {
logic_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
offset = sector_div(logic_sb_block, blocksize);
offset = do_div(logic_sb_block, blocksize);
} else {
logic_sb_block = sb_block;
}
Expand Down Expand Up @@ -1591,7 +1591,7 @@ 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;
offset = sector_div(logic_sb_block, blocksize);
offset = do_div(logic_sb_block, blocksize);
bh = sb_bread(sb, logic_sb_block);
if (!bh) {
printk(KERN_ERR
Expand Down

0 comments on commit c38155d

Please sign in to comment.