drm/rockchip: vop: correct pin_pol define
[firefly-linux-kernel-4.4.55.git] / mm / percpu.c
index 1f376bce413c174d779d5d8584bb61dec75700a1..ef6353f0adbd75fc30855ac215a47f8029880e85 100644 (file)
@@ -1012,8 +1012,11 @@ area_found:
                mutex_unlock(&pcpu_alloc_mutex);
        }
 
-       if (chunk != pcpu_reserved_chunk)
+       if (chunk != pcpu_reserved_chunk) {
+               spin_lock_irqsave(&pcpu_lock, flags);
                pcpu_nr_empty_pop_pages -= occ_pages;
+               spin_unlock_irqrestore(&pcpu_lock, flags);
+       }
 
        if (pcpu_nr_empty_pop_pages < PCPU_EMPTY_POP_PAGES_LOW)
                pcpu_schedule_balance_work();