From: Vlastimil Babka Date: Mon, 23 Aug 2021 23:59:01 +0000 (+1000) Subject: mm, slub: don't disable irqs in slub_cpu_dead() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1e571e786dd50492d99586f8bbc48dfa86b7a08d;p=users%2Fjedix%2Flinux-maple.git mm, slub: don't disable irqs in slub_cpu_dead() slub_cpu_dead() cleans up for an offlined cpu from another cpu and calls only functions that are now irq safe, so we don't need to disable irqs anymore. Link: https://lkml.kernel.org/r/20210805152000.12817-28-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Jann Horn Cc: Jesper Dangaard Brouer Cc: Joonsoo Kim Cc: Mel Gorman Cc: Mike Galbraith Cc: Pekka Enberg Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- diff --git a/mm/slub.c b/mm/slub.c index fc09ec3563b4d..ddcaddc5e8017 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2540,14 +2540,10 @@ static void flush_all(struct kmem_cache *s) static int slub_cpu_dead(unsigned int cpu) { struct kmem_cache *s; - unsigned long flags; mutex_lock(&slab_mutex); - list_for_each_entry(s, &slab_caches, list) { - local_irq_save(flags); + list_for_each_entry(s, &slab_caches, list) __flush_cpu_slab(s, cpu); - local_irq_restore(flags); - } mutex_unlock(&slab_mutex); return 0; }