]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/page_alloc.c
mm/page_alloc.c: make sure OOM victim can try allocations with no watermarks once
[karo-tx-linux.git] / mm / page_alloc.c
index f9e450c6b6e414d61b00d5a61be9cdea3b773e1b..b7a6f583a3733b14d421a7ba6a92013a43050f7b 100644 (file)
@@ -3870,7 +3870,9 @@ retry:
                goto got_pg;
 
        /* Avoid allocations with no watermarks from looping endlessly */
-       if (test_thread_flag(TIF_MEMDIE))
+       if (test_thread_flag(TIF_MEMDIE) &&
+           (alloc_flags == ALLOC_NO_WATERMARKS ||
+            (gfp_mask & __GFP_NOMEMALLOC)))
                goto nopage;
 
        /* Retry as long as the OOM killer is making progress */