[PATCH] mm, slab: simplify lockdep_assert_held in lockdep_assert_held()

From: Vlastimil Babka
Date: Tue Aug 17 2021 - 11:51:54 EST


Sebastian reports [1] that the special version of lockdep_assert_held() for a
local lock with PREEMPT_RT is no longer necessary, and we can simplify.

[1] https://lore.kernel.org/linux-mm/20210817153937.hxnuh7mqp6vuiyws@xxxxxxxxxxxxx/

This is a fixup for mmotm patch
mm-slub-convert-kmem_cpu_slab-protection-to-local_lock.patch

Reported-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
---
mm/slub.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index be57687062aa..df1ac8aff86f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2913,11 +2913,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,

load_freelist:

-#ifdef CONFIG_PREEMPT_RT
- lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
-#else
lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock));
-#endif

/*
* freelist is pointing to the list of objects to be used.
--
2.32.0