Fix potential endless loop in kswapd when compaction is not enabled
[deliverable/linux.git] / mm / vmscan.c
index 7658fd6536dd241c78bca77415b49994339b8516..33c332bbab738231105cc7c3cfacf80e5297ed6e 100644 (file)
@@ -2946,7 +2946,8 @@ out:
                                continue;
 
                        /* Would compaction fail due to lack of free memory? */
-                       if (compaction_suitable(zone, order) == COMPACT_SKIPPED)
+                       if (COMPACTION_BUILD &&
+                           compaction_suitable(zone, order) == COMPACT_SKIPPED)
                                goto loop_again;
 
                        /* Confirm the zone is balanced for order-0 */
This page took 0.028774 seconds and 5 git commands to generate.