diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/compaction.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index e721d252c5d2..455ecd87f48d 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -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, 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; - 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 |