[lkml]   [2017]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] mm: use in_atomic() in print_vma_addr()
commit 3e51f3c4004c9b01f66da03214a3e206f5ed627b
("sched/preempt: Remove PREEMPT_ACTIVE unmasking off in_atomic()") makes
in_atomic() just check the preempt count, so it is not necessary to use
preempt_count() in print_vma_addr() any more. Replace preempt_count() to
in_atomic() which is a generic API for checking atomic context.

Signed-off-by: Yang Shi <>
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index a728bed..19b684e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4460,7 +4460,7 @@ void print_vma_addr(char *prefix, unsigned long ip)
* Do not print if we are in atomic
* contexts (in exception stacks, etc.):
- if (preempt_count())
+ if (in_atomic())

 \ /
  Last update: 2017-11-01 22:40    [W:0.122 / U:8.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site