diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8f65abeb9ad6..cd5390f2f18d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2296,7 +2296,11 @@ gfp_to_alloc_flags(gfp_t gfp_mask) | |||
2296 | if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) { | 2296 | if (likely(!(gfp_mask & __GFP_NOMEMALLOC))) { |
2297 | if (gfp_mask & __GFP_MEMALLOC) | 2297 | if (gfp_mask & __GFP_MEMALLOC) |
2298 | alloc_flags |= ALLOC_NO_WATERMARKS; | 2298 | alloc_flags |= ALLOC_NO_WATERMARKS; |
2299 | else if (likely(!(gfp_mask & __GFP_NOMEMALLOC)) && !in_interrupt()) | 2299 | else if (in_serving_softirq() && (current->flags & PF_MEMALLOC)) |
2300 | alloc_flags |= ALLOC_NO_WATERMARKS; | ||
2301 | else if (!in_interrupt() && | ||
2302 | ((current->flags & PF_MEMALLOC) || | ||
2303 | unlikely(test_thread_flag(TIF_MEMDIE)))) | ||
2300 | alloc_flags |= ALLOC_NO_WATERMARKS; | 2304 | alloc_flags |= ALLOC_NO_WATERMARKS; |
2301 | } | 2305 | } |
2302 | 2306 | ||