mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@virtuozzo.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org
Subject: [PATCH] mm: use in_task() in __gfp_pfmemalloc_flags()
Date: Mon, 9 Aug 2021 11:23:29 +0300	[thread overview]
Message-ID: <f748aef6-9def-bea1-de7f-5ff88d7b3285@virtuozzo.com> (raw)

obsoleted in_interrupt() include task context with disabled BH,
it's better to use in_task() instead.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 856b175..4291639 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4733,7 +4733,7 @@ static inline int __gfp_pfmemalloc_flags(gfp_t gfp_mask)
 		return ALLOC_NO_WATERMARKS;
 	if (in_serving_softirq() && (current->flags & PF_MEMALLOC))
 		return ALLOC_NO_WATERMARKS;
-	if (!in_interrupt()) {
+	if (in_task()) {
 		if (current->flags & PF_MEMALLOC)
 			return ALLOC_NO_WATERMARKS;
 		else if (oom_reserves_allowed(current))
-- 
1.8.3.1


             reply	other threads:[~2021-08-09  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09  8:23 Vasily Averin [this message]
2021-08-09 18:24 ` Andrew Morton
2021-08-10 11:04   ` Vasily Averin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f748aef6-9def-bea1-de7f-5ff88d7b3285@virtuozzo.com \
    --to=vvs@virtuozzo.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®