]> err.no Git - linux-2.6/blobdiff - mm/page_alloc.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / mm / page_alloc.c
index 6d3550ca028201cf74f266d16789cc9608f71d0f..3da85b81dabb32608fa065f8086de64f725f5af8 100644 (file)
@@ -726,7 +726,7 @@ static void __drain_pages(unsigned int cpu)
        }
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_HIBERNATION
 
 void mark_free_pages(struct zone *zone)
 {
@@ -772,7 +772,7 @@ void drain_local_pages(void)
        __drain_pages(smp_processor_id());
        local_irq_restore(flags);       
 }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_HIBERNATION */
 
 /*
  * Free a 0-order page
@@ -1350,6 +1350,10 @@ nofail_alloc:
                if (page)
                        goto got_pg;
 
+               /* The OOM killer will not help higher order allocs so fail */
+               if (order > PAGE_ALLOC_COSTLY_ORDER)
+                       goto nopage;
+
                out_of_memory(zonelist, gfp_mask, order);
                goto restart;
        }