aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/slub.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 238c5a6ee896..51663a3c3c24 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2608,6 +2608,19 @@ static void for_all_slabs(void (*func)(struct kmem_cache *, int), int cpu)
2608} 2608}
2609 2609
2610/* 2610/*
2611 * Version of __flush_cpu_slab for the case that interrupts
2612 * are enabled.
2613 */
2614static void cpu_slab_flush(struct kmem_cache *s, int cpu)
2615{
2616 unsigned long flags;
2617
2618 local_irq_save(flags);
2619 __flush_cpu_slab(s, cpu);
2620 local_irq_restore(flags);
2621}
2622
2623/*
2611 * Use the cpu notifier to insure that the cpu slabs are flushed when 2624 * Use the cpu notifier to insure that the cpu slabs are flushed when
2612 * necessary. 2625 * necessary.
2613 */ 2626 */
@@ -2621,7 +2634,7 @@ static int __cpuinit slab_cpuup_callback(struct notifier_block *nfb,
2621 case CPU_UP_CANCELED_FROZEN: 2634 case CPU_UP_CANCELED_FROZEN:
2622 case CPU_DEAD: 2635 case CPU_DEAD:
2623 case CPU_DEAD_FROZEN: 2636 case CPU_DEAD_FROZEN:
2624 for_all_slabs(__flush_cpu_slab, cpu); 2637 for_all_slabs(cpu_slab_flush, cpu);
2625 break; 2638 break;
2626 default: 2639 default:
2627 break; 2640 break;