Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e53d2f74 authored by Vinayak Menon's avatar Vinayak Menon Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent 10da9faf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4646,7 +4646,8 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
	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 */