diff options
Diffstat (limited to 'mm/percpu.c')
-rw-r--r-- | mm/percpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index 442010cc91c6..083e7c91e5f6 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -1271,7 +1271,7 @@ static void pcpu_reclaim(struct work_struct *work) | |||
1271 | */ | 1271 | */ |
1272 | void free_percpu(void *ptr) | 1272 | void free_percpu(void *ptr) |
1273 | { | 1273 | { |
1274 | void *addr = __pcpu_ptr_to_addr(ptr); | 1274 | void *addr; |
1275 | struct pcpu_chunk *chunk; | 1275 | struct pcpu_chunk *chunk; |
1276 | unsigned long flags; | 1276 | unsigned long flags; |
1277 | int off; | 1277 | int off; |
@@ -1279,6 +1279,8 @@ void free_percpu(void *ptr) | |||
1279 | if (!ptr) | 1279 | if (!ptr) |
1280 | return; | 1280 | return; |
1281 | 1281 | ||
1282 | addr = __pcpu_ptr_to_addr(ptr); | ||
1283 | |||
1282 | spin_lock_irqsave(&pcpu_lock, flags); | 1284 | spin_lock_irqsave(&pcpu_lock, flags); |
1283 | 1285 | ||
1284 | chunk = pcpu_chunk_addr_search(addr); | 1286 | chunk = pcpu_chunk_addr_search(addr); |