mm/compaction: fix wrong order check in compact_finished()
[firefly-linux-kernel-4.4.55.git] / mm / compaction.c
index b68736c8a1ce0d5c74bd8ebfa78b502c5be37cf6..4954e196680c88793eeb7395a232f11e44234017 100644 (file)
@@ -1173,7 +1173,7 @@ static int __compact_finished(struct zone *zone, struct compact_control *cc,
                        return COMPACT_PARTIAL;
 
                /* Job done if allocation would set block type */
-               if (cc->order >= pageblock_order && area->nr_free)
+               if (order >= pageblock_order && area->nr_free)
                        return COMPACT_PARTIAL;
        }