Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156033
b: refs/heads/master
c: 6583bb6
h: refs/heads/master
i:
  156031: 8c219f8
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Jul 30, 2009
1 parent 886ba4a commit 4e5e0b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e084b2d95e48b31aa45f9c49ffc6cdae8bdb21d4
refs/heads/master: 6583bb64fc370842b32a87c67750c26f6d559af0
4 changes: 4 additions & 0 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
if (p->flags & PF_MEMALLOC)
goto nopage;

/* Avoid allocations with no watermarks from looping endlessly */
if (test_thread_flag(TIF_MEMDIE) && !(gfp_mask & __GFP_NOFAIL))
goto nopage;

/* Try direct reclaim and then allocating */
page = __alloc_pages_direct_reclaim(gfp_mask, order,
zonelist, high_zoneidx,
Expand Down

0 comments on commit 4e5e0b8

Please sign in to comment.