diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index f73e5eb43eae1dace29cd0082500be7ebbe71e06..208b87ce885889fa6c0ec83c59e061ed36a87b41 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -510,7 +510,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent, goto fallback; } - max_dirs = ndirs / ngroups + inodes_per_group / 16; + max_dirs = ndirs / ngroups + inodes_per_group*flex_size / 16; min_inodes = avefreei - inodes_per_group*flex_size / 4; if (min_inodes < 1) min_inodes = 1;