diff --git a/[refs] b/[refs] index 319a2b31766c..6cff62f04d38 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3305de51bf612603c9a4e4dc98ceb839ef933749 +refs/heads/master: 82478fb7bca28e3ca2f3c55c14e690f749dd4dbb diff --git a/trunk/mm/compaction.c b/trunk/mm/compaction.c index 6d592a021072..8be430b812de 100644 --- a/trunk/mm/compaction.c +++ b/trunk/mm/compaction.c @@ -406,6 +406,10 @@ static int compact_finished(struct zone *zone, if (!zone_watermark_ok(zone, cc->order, watermark, 0, 0)) return COMPACT_CONTINUE; + /* + * order == -1 is expected when compacting via + * /proc/sys/vm/compact_memory + */ if (cc->order == -1) return COMPACT_CONTINUE; @@ -453,6 +457,13 @@ unsigned long compaction_suitable(struct zone *zone, int order) if (!zone_watermark_ok(zone, 0, watermark, 0, 0)) return COMPACT_SKIPPED; + /* + * order == -1 is expected when compacting via + * /proc/sys/vm/compact_memory + */ + if (order == -1) + return COMPACT_CONTINUE; + /* * fragmentation index determines if allocation failures are due to * low memory or external fragmentation