Skip to content

Commit

Permalink
mm, slab: simplify lockdep_assert_held in lockdep_assert_held()
Browse files Browse the repository at this point in the history
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/[email protected]/

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

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Vlastimil Babka <[email protected]>
Reported-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
  • Loading branch information
tehcaster authored and sfrothwell committed Aug 23, 2021
1 parent c419ab1 commit f250992
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f250992

Please sign in to comment.