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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ae28c22a7fdb..2dbb2fc68837 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1794,6 +1794,10 @@ rebalance:
1794 if (p->flags & PF_MEMALLOC) 1794 if (p->flags & PF_MEMALLOC)
1795 goto nopage; 1795 goto nopage;
1796 1796
1797 /* Avoid allocations with no watermarks from looping endlessly */
1798 if (test_thread_flag(TIF_MEMDIE) && !(gfp_mask & __GFP_NOFAIL))
1799 goto nopage;
1800
1797 /* Try direct reclaim and then allocating */ 1801 /* Try direct reclaim and then allocating */
1798 page = __alloc_pages_direct_reclaim(gfp_mask, order, 1802 page = __alloc_pages_direct_reclaim(gfp_mask, order,
1799 zonelist, high_zoneidx, 1803 zonelist, high_zoneidx,