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 alloc_pages()
Date: Mon, 9 Aug 2021 10:51:45 +0300 [thread overview]
Message-ID: <96b9726a-4e43-bcf3-a27f-8fb7aa4a170b@virtuozzo.com> (raw)
obsoleted in_interrupt() includes task context with enabled BH,
it's better to use in_task() instead.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e32360e..2f8ee67 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2231,7 +2231,7 @@ struct page *alloc_pages(gfp_t gfp, unsigned order)
struct mempolicy *pol = &default_policy;
struct page *page;
- if (!in_interrupt() && !(gfp & __GFP_THISNODE))
+ if (in_task() && !(gfp & __GFP_THISNODE))
pol = get_task_policy(current);
/*
--
1.8.3.1
reply other threads:[~2021-08-09 7:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=96b9726a-4e43-bcf3-a27f-8fb7aa4a170b@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