X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fpage_alloc.c;h=3da85b81dabb32608fa065f8086de64f725f5af8;hb=75ecb1a4d148b274aa9acd1d6ccaca0a4654784e;hp=6d3550ca028201cf74f266d16789cc9608f71d0f;hpb=257f49251c802c67030c11f63cee4ed7b50f6639;p=linux-2.6 diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6d3550ca02..3da85b81da 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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; }