diff mbox series

[058/147] mm: in_irq() cleanup

Message ID 20210908025612.HIrVK1YBi%akpm@linux-foundation.org (mailing list archive)
State New
Headers show
Series [001/147] mm, slub: don't call flush_all() from slab_debug_trace_open() | expand

Commit Message

Andrew Morton Sept. 8, 2021, 2:56 a.m. UTC
From: Changbin Du <changbin.du@gmail.com>
Subject: mm: in_irq() cleanup

Replace the obsolete and ambiguos macro in_irq() with new macro
in_hardirq().

Link: https://lkml.kernel.org/r/20210813145245.86070-1-changbin.du@gmail.com
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[kmemleak]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/highmem.c  |    2 +-
 mm/kmemleak.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

--- a/mm/highmem.c~mm-in_irq-cleanup
+++ a/mm/highmem.c
@@ -436,7 +436,7 @@  EXPORT_SYMBOL(zero_user_segments);
 
 static inline int kmap_local_idx_push(void)
 {
-	WARN_ON_ONCE(in_irq() && !irqs_disabled());
+	WARN_ON_ONCE(in_hardirq() && !irqs_disabled());
 	current->kmap_ctrl.idx += KM_INCR;
 	BUG_ON(current->kmap_ctrl.idx >= KM_MAX_IDX);
 	return current->kmap_ctrl.idx - 1;
--- a/mm/kmemleak.c~mm-in_irq-cleanup
+++ a/mm/kmemleak.c
@@ -598,7 +598,7 @@  static struct kmemleak_object *create_ob
 	object->checksum = 0;
 
 	/* task information */
-	if (in_irq()) {
+	if (in_hardirq()) {
 		object->pid = 0;
 		strncpy(object->comm, "hardirq", sizeof(object->comm));
 	} else if (in_serving_softirq()) {