]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm, slub: unify cmpxchg_double_slab() and __cmpxchg_double_slab()
authorVlastimil Babka <vbabka@suse.cz>
Mon, 23 Aug 2021 23:58:55 +0000 (09:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:25 +0000 (09:33 +1000)
commit2625ffdf3276758c6e50bb713a46c6e6aa84953f
treed99ca89dbfb2348091850861fbd25adcb125c9e8
parent932dab59a0e9741a03a151d7d03e3eaf674c90df
mm, slub: unify cmpxchg_double_slab() and __cmpxchg_double_slab()

These functions differ only in irq disabling in the slow path.  We can
create a common function with an extra bool parameter to control the irq
disabling.  As the functions are inline and the parameter compile-time
constant, there will be no runtime overhead due to this change.

Also change the DEBUG_VM based irqs disable assert to the more standard
lockdep_assert based one.

Link: https://lkml.kernel.org/r/20210805152000.12817-7-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Jann Horn <jannh@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/slub.c