aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 08e8627361a0..04a35b3d3262 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -799,14 +799,18 @@ __alloc_pages(unsigned int __nocast gfp_mask, unsigned int order,
799 } 799 }
800 800
801 /* This allocation should allow future memory freeing. */ 801 /* This allocation should allow future memory freeing. */
802 if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE))) && !in_interrupt()) { 802
803 /* go through the zonelist yet again, ignoring mins */ 803 if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE)))
804 for (i = 0; (z = zones[i]) != NULL; i++) { 804 && !in_interrupt()) {
805 if (!cpuset_zone_allowed(z)) 805 if (!(gfp_mask & __GFP_NOMEMALLOC)) {
806 continue; 806 /* go through the zonelist yet again, ignoring mins */
807 page = buffered_rmqueue(z, order, gfp_mask); 807 for (i = 0; (z = zones[i]) != NULL; i++) {
808 if (page) 808 if (!cpuset_zone_allowed(z))
809 goto got_pg; 809 continue;
810 page = buffered_rmqueue(z, order, gfp_mask);
811 if (page)
812 goto got_pg;
813 }
810 } 814 }
811 goto nopage; 815 goto nopage;
812 } 816 }