|
@@ -124,12 +124,13 @@ static int __cpuinit percpu_counter_hotcpu_callback(struct notifier_block *nb,
|
|
mutex_lock(&percpu_counters_lock);
|
|
mutex_lock(&percpu_counters_lock);
|
|
list_for_each_entry(fbc, &percpu_counters, list) {
|
|
list_for_each_entry(fbc, &percpu_counters, list) {
|
|
s32 *pcount;
|
|
s32 *pcount;
|
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
- spin_lock(&fbc->lock);
|
|
|
|
|
|
+ spin_lock_irqsave(&fbc->lock, flags);
|
|
pcount = per_cpu_ptr(fbc->counters, cpu);
|
|
pcount = per_cpu_ptr(fbc->counters, cpu);
|
|
fbc->count += *pcount;
|
|
fbc->count += *pcount;
|
|
*pcount = 0;
|
|
*pcount = 0;
|
|
- spin_unlock(&fbc->lock);
|
|
|
|
|
|
+ spin_unlock_irqrestore(&fbc->lock, flags);
|
|
}
|
|
}
|
|
mutex_unlock(&percpu_counters_lock);
|
|
mutex_unlock(&percpu_counters_lock);
|
|
return NOTIFY_OK;
|
|
return NOTIFY_OK;
|