Commit aaf0f2fa authored by Eric Dumazet's avatar Eric Dumazet Committed by Tejun Heo

percpu_counter: percpu_counter_hotcpu_callback() cleanup

In commit ebd8fef3 ("percpu_counter: make percpu_counters_lock
irq-safe") we disabled irqs in percpu_counter_hotcpu_callback()

We can grab every counter spinlock without having to disable
irqs again.
Signed-off-by: default avatarEric Dumazet <>
Cc: Tejun Heo <>
Signed-off-by: default avatarTejun Heo <>
parent 44b4b461
......@@ -176,13 +176,12 @@ static int percpu_counter_cpu_dead(unsigned int cpu)
list_for_each_entry(fbc, &percpu_counters, list) {
s32 *pcount;
unsigned long flags;
raw_spin_lock_irqsave(&fbc->lock, flags);
pcount = per_cpu_ptr(fbc->counters, cpu);
fbc->count += *pcount;
*pcount = 0;
raw_spin_unlock_irqrestore(&fbc->lock, flags);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment