[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f748aef6-9def-bea1-de7f-5ff88d7b3285@virtuozzo.com>
Date: Mon, 9 Aug 2021 11:23:29 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, kernel@...nvz.org
Subject: [PATCH] mm: use in_task() in __gfp_pfmemalloc_flags()
obsoleted in_interrupt() include task context with disabled BH,
it's better to use in_task() instead.
Signed-off-by: Vasily Averin <vvs@...tuozzo.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
Powered by blists - more mailing lists