]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm, slab: simplify lockdep_assert_held in lockdep_assert_held()
authorVlastimil Babka <vbabka@suse.cz>
Mon, 23 Aug 2021 23:59:03 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:34 +0000 (09:33 +1000)
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@linutronix.de/

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

Link: https://lkml.kernel.org/r/7e9ccf34-57d1-786b-2dfd-3b9ba78e1b32@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/slub.c

index be57687062aa12503d8e1419378932cfc0eadf09..df1ac8aff86fea76a1fad763eb1d14f6bdd2bb88 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2913,11 +2913,7 @@ redo:
 
 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.