Commit 88dc6f20 authored by Vasily Averin's avatar Vasily Averin Committed by Linus Torvalds

mm/page_alloc.c: use in_task()

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

Link: https://lkml.kernel.org/r/877caa99-1994-5545-92d2-d0bb2e394182@virtuozzo.comSigned-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3b446da6
...@@ -4211,7 +4211,7 @@ static void warn_alloc_show_mem(gfp_t gfp_mask, nodemask_t *nodemask) ...@@ -4211,7 +4211,7 @@ static void warn_alloc_show_mem(gfp_t gfp_mask, nodemask_t *nodemask)
if (tsk_is_oom_victim(current) || if (tsk_is_oom_victim(current) ||
(current->flags & (PF_MEMALLOC | PF_EXITING))) (current->flags & (PF_MEMALLOC | PF_EXITING)))
filter &= ~SHOW_MEM_FILTER_NODES; filter &= ~SHOW_MEM_FILTER_NODES;
if (in_interrupt() || !(gfp_mask & __GFP_DIRECT_RECLAIM)) if (!in_task() || !(gfp_mask & __GFP_DIRECT_RECLAIM))
filter &= ~SHOW_MEM_FILTER_NODES; filter &= ~SHOW_MEM_FILTER_NODES;
show_mem(filter, nodemask); show_mem(filter, nodemask);
...@@ -4697,7 +4697,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask) ...@@ -4697,7 +4697,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
* comment for __cpuset_node_allowed(). * comment for __cpuset_node_allowed().
*/ */
alloc_flags &= ~ALLOC_CPUSET; alloc_flags &= ~ALLOC_CPUSET;
} else if (unlikely(rt_task(current)) && !in_interrupt()) } else if (unlikely(rt_task(current)) && in_task())
alloc_flags |= ALLOC_HARDER; alloc_flags |= ALLOC_HARDER;
alloc_flags = gfp_to_alloc_flags_cma(gfp_mask, alloc_flags); alloc_flags = gfp_to_alloc_flags_cma(gfp_mask, alloc_flags);
...@@ -5157,7 +5157,7 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order, ...@@ -5157,7 +5157,7 @@ static inline bool prepare_alloc_pages(gfp_t gfp_mask, unsigned int order,
* When we are in the interrupt context, it is irrelevant * When we are in the interrupt context, it is irrelevant
* to the current task context. It means that any node ok. * to the current task context. It means that any node ok.
*/ */
if (!in_interrupt() && !ac->nodemask) if (in_task() && !ac->nodemask)
ac->nodemask = &cpuset_current_mems_allowed; ac->nodemask = &cpuset_current_mems_allowed;
else else
*alloc_flags |= ALLOC_CPUSET; *alloc_flags |= ALLOC_CPUSET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment