diff options
Diffstat (limited to 'fs/ext3/ialloc.c')
-rw-r--r-- | fs/ext3/ialloc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index dc826464f313..36546ed36a14 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c | |||
@@ -262,9 +262,11 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) | |||
262 | int ngroups = sbi->s_groups_count; | 262 | int ngroups = sbi->s_groups_count; |
263 | int inodes_per_group = EXT3_INODES_PER_GROUP(sb); | 263 | int inodes_per_group = EXT3_INODES_PER_GROUP(sb); |
264 | int freei, avefreei; | 264 | int freei, avefreei; |
265 | int freeb, avefreeb; | 265 | ext3_fsblk_t freeb, avefreeb; |
266 | int blocks_per_dir, ndirs; | 266 | ext3_fsblk_t blocks_per_dir; |
267 | int max_debt, max_dirs, min_blocks, min_inodes; | 267 | int ndirs; |
268 | int max_debt, max_dirs, min_inodes; | ||
269 | ext3_grpblk_t min_blocks; | ||
268 | int group = -1, i; | 270 | int group = -1, i; |
269 | struct ext3_group_desc *desc; | 271 | struct ext3_group_desc *desc; |
270 | struct buffer_head *bh; | 272 | struct buffer_head *bh; |
@@ -307,7 +309,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) | |||
307 | min_inodes = avefreei - inodes_per_group / 4; | 309 | min_inodes = avefreei - inodes_per_group / 4; |
308 | min_blocks = avefreeb - EXT3_BLOCKS_PER_GROUP(sb) / 4; | 310 | min_blocks = avefreeb - EXT3_BLOCKS_PER_GROUP(sb) / 4; |
309 | 311 | ||
310 | max_debt = EXT3_BLOCKS_PER_GROUP(sb) / max(blocks_per_dir, BLOCK_COST); | 312 | max_debt = EXT3_BLOCKS_PER_GROUP(sb) / max(blocks_per_dir, (ext3_fsblk_t)BLOCK_COST); |
311 | if (max_debt * INODE_COST > inodes_per_group) | 313 | if (max_debt * INODE_COST > inodes_per_group) |
312 | max_debt = inodes_per_group / INODE_COST; | 314 | max_debt = inodes_per_group / INODE_COST; |
313 | if (max_debt > 255) | 315 | if (max_debt > 255) |