mm: page_alloc: avoid fatal sig check for GFP_NOFS

Some of the fs allocations like those for journalling
are critical and can cause a fatal error if allocation
fails. Avoid bailing out early in those cases, even if
a fatal signal is pending on the caller task.

Change-Id: Ib2803d763313b196123a4c1e2c66227b5d6e6e14
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
Vinayak Menon 2020-03-31 10:38:58 +05:30 • committed by Gerrit - the friendly Code Review server
commit 665cc127aa

View file

@ -4692,7 +4692,8 @@ retry:
if (current->flags & PF_MEMALLOC)
goto nopage;
if (fatal_signal_pending(current) && !(gfp_mask & __GFP_NOFAIL))
if (fatal_signal_pending(current) && !(gfp_mask & __GFP_NOFAIL) &&
(gfp_mask & __GFP_FS))
goto nopage;
/* Try direct reclaim and then allocating */