diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f9e450c6b6e4..b7a6f583a373 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3870,7 +3870,9 @@ retry: | |||
3870 | goto got_pg; | 3870 | goto got_pg; |
3871 | 3871 | ||
3872 | /* Avoid allocations with no watermarks from looping endlessly */ | 3872 | /* Avoid allocations with no watermarks from looping endlessly */ |
3873 | if (test_thread_flag(TIF_MEMDIE)) | 3873 | if (test_thread_flag(TIF_MEMDIE) && |
3874 | (alloc_flags == ALLOC_NO_WATERMARKS || | ||
3875 | (gfp_mask & __GFP_NOMEMALLOC))) | ||
3874 | goto nopage; | 3876 | goto nopage; |
3875 | 3877 | ||
3876 | /* Retry as long as the OOM killer is making progress */ | 3878 | /* Retry as long as the OOM killer is making progress */ |