diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 9e2c08a8665f2c7d3cc3569cf54dfecdcadb9f4e..81641be38c0e8b7933ff24e9117fdfbce14a2750 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -514,6 +514,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