summaryrefslogtreecommitdiff
path: root/mm/percpu-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'mm/percpu-internal.h')
-rw-r--r--mm/percpu-internal.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h
index d030fce745a2..cd2442e13d8f 100644
--- a/mm/percpu-internal.h
+++ b/mm/percpu-internal.h
@@ -116,13 +116,14 @@ static inline void pcpu_stats_area_dealloc(struct pcpu_chunk *chunk)
*/
static inline void pcpu_stats_chunk_alloc(void)
{
- spin_lock_irq(&pcpu_lock);
+ unsigned long flags;
+ spin_lock_irqsave(&pcpu_lock, flags);
pcpu_stats.nr_chunks++;
pcpu_stats.nr_max_chunks =
max(pcpu_stats.nr_max_chunks, pcpu_stats.nr_chunks);
- spin_unlock_irq(&pcpu_lock);
+ spin_unlock_irqrestore(&pcpu_lock, flags);
}
/*
@@ -130,11 +131,12 @@ static inline void pcpu_stats_chunk_alloc(void)
*/
static inline void pcpu_stats_chunk_dealloc(void)
{
- spin_lock_irq(&pcpu_lock);
+ unsigned long flags;
+ spin_lock_irqsave(&pcpu_lock, flags);
pcpu_stats.nr_chunks--;
- spin_unlock_irq(&pcpu_lock);
+ spin_unlock_irqrestore(&pcpu_lock, flags);
}
#else