|
@@ -1383,15 +1383,12 @@ static enum compact_result compact_zone(struct zone *zone, struct compact_contro
|
|
|
|
|
|
ret = compaction_suitable(zone, cc->order, cc->alloc_flags,
|
|
ret = compaction_suitable(zone, cc->order, cc->alloc_flags,
|
|
cc->classzone_idx);
|
|
cc->classzone_idx);
|
|
- switch (ret) {
|
|
|
|
- case COMPACT_PARTIAL:
|
|
|
|
- case COMPACT_SKIPPED:
|
|
|
|
- /* Compaction is likely to fail */
|
|
|
|
|
|
+ /* Compaction is likely to fail */
|
|
|
|
+ if (ret == COMPACT_PARTIAL || ret == COMPACT_SKIPPED)
|
|
return ret;
|
|
return ret;
|
|
- case COMPACT_CONTINUE:
|
|
|
|
- /* Fall through to compaction */
|
|
|
|
- ;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ /* huh, compaction_suitable is returning something unexpected */
|
|
|
|
+ VM_BUG_ON(ret != COMPACT_CONTINUE);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Clear pageblock skip if there were failures recently and compaction
|
|
* Clear pageblock skip if there were failures recently and compaction
|