SLUB: simplify re on_each_cpu()
authorAlexey Dobriyan <adobriyan@gmail.com>
Wed, 16 Jul 2008 17:29:02 +0000 (21:29 +0400)
committerPekka Enberg <penberg@cs.helsinki.fi>
Wed, 16 Jul 2008 20:55:00 +0000 (23:55 +0300)
on_each_cpu() expands to function call on UP, too.

Acked-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slub.c

index 35ab38a94b46279dc018c14841452f533313702b..6cd9fec18f929f6050bc308393af54cfd3838829 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1495,15 +1495,7 @@ static void flush_cpu_slab(void *d)
 
 static void flush_all(struct kmem_cache *s)
 {
-#ifdef CONFIG_SMP
        on_each_cpu(flush_cpu_slab, s, 1);
-#else
-       unsigned long flags;
-
-       local_irq_save(flags);
-       flush_cpu_slab(s);
-       local_irq_restore(flags);
-#endif
 }
 
 /*