diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index ad762c195..0fd7801ed 100755 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -516,6 +516,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent, if (min_inodes < 1) min_inodes = 1; min_clusters = avefreec - EXT4_CLUSTERS_PER_GROUP(sb)*flex_size / 4; + if (min_clusters < 0) + min_clusters = 0; /* * Start looking in the flex group where we last allocated an