diff options
-rw-r--r-- | mm/swap.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mm/swap.c b/mm/swap.c index 8ef0e84fdeed..0f9ad9dc1d7a 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -42,7 +42,7 @@ static DEFINE_PER_CPU(struct pagevec, lru_rotate_pvecs); static DEFINE_PER_CPU(struct pagevec, lru_deactivate_pvecs); static DEFINE_LOCAL_IRQ_LOCK(rotate_lock); -static DEFINE_LOCAL_IRQ_LOCK(swap_lock); +static DEFINE_LOCAL_IRQ_LOCK(swapvec_lock); /* * This path almost never happens for VM activity - pages are normally @@ -407,13 +407,13 @@ static void activate_page_drain(int cpu) void activate_page(struct page *page) { if (PageLRU(page) && !PageActive(page) && !PageUnevictable(page)) { - struct pagevec *pvec = &get_locked_var(swap_lock, + struct pagevec *pvec = &get_locked_var(swapvec_lock, activate_page_pvecs); page_cache_get(page); if (!pagevec_add(pvec, page)) pagevec_lru_move_fn(pvec, __activate_page, NULL); - put_locked_var(swap_lock, activate_page_pvecs); + put_locked_var(swapvec_lock, activate_page_pvecs); } } @@ -453,12 +453,12 @@ EXPORT_SYMBOL(mark_page_accessed); void __lru_cache_add(struct page *page, enum lru_list lru) { - struct pagevec *pvec = &get_locked_var(swap_lock, lru_add_pvecs)[lru]; + struct pagevec *pvec = &get_locked_var(swapvec_lock, lru_add_pvecs)[lru]; page_cache_get(page); if (!pagevec_add(pvec, page)) __pagevec_lru_add(pvec, lru); - put_locked_var(swap_lock, lru_add_pvecs); + put_locked_var(swapvec_lock, lru_add_pvecs); } EXPORT_SYMBOL(__lru_cache_add); @@ -623,19 +623,19 @@ void deactivate_page(struct page *page) return; if (likely(get_page_unless_zero(page))) { - struct pagevec *pvec = &get_locked_var(swap_lock, + struct pagevec *pvec = &get_locked_var(swapvec_lock, lru_deactivate_pvecs); if (!pagevec_add(pvec, page)) pagevec_lru_move_fn(pvec, lru_deactivate_fn, NULL); - put_locked_var(swap_lock, lru_deactivate_pvecs); + put_locked_var(swapvec_lock, lru_deactivate_pvecs); } } void lru_add_drain(void) { - lru_add_drain_cpu(local_lock_cpu(swap_lock)); - local_unlock_cpu(swap_lock); + lru_add_drain_cpu(local_lock_cpu(swapvec_lock)); + local_unlock_cpu(swapvec_lock); } static void lru_add_drain_per_cpu(struct work_struct *dummy) @@ -850,7 +850,7 @@ EXPORT_SYMBOL(pagevec_lookup_tag); static int __init swap_init_locks(void) { local_irq_lock_init(rotate_lock); - local_irq_lock_init(swap_lock); + local_irq_lock_init(swapvec_lock); return 1; } early_initcall(swap_init_locks); |