mm, compaction: pass classzone_idx and alloc_flags to watermark checking
[pandora-kernel.git] / mm / page_alloc.c
index f3a6bf1..e32121f 100644 (file)
@@ -741,6 +741,9 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
        int i;
        int bad = 0;
 
+       VM_BUG_ON_PAGE(PageTail(page), page);
+       VM_BUG_ON_PAGE(PageHead(page) && compound_order(page) != order, page);
+
        trace_mm_page_free(page, order);
        kmemcheck_free_shadow(page, order);
 
@@ -2338,6 +2341,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
        compact_result = try_to_compact_pages(zonelist, order, gfp_mask,
                                                nodemask, mode,
                                                contended_compaction,
+                                               alloc_flags, classzone_idx,
                                                &last_compact_zone);
        current->flags &= ~PF_MEMALLOC;