diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-01-10 09:50:51 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2013-02-13 17:15:32 -0500 |
commit | 2b8d395e3b8fd000eead84ca569ad71b489af0da (patch) | |
tree | 0fcd4effd2e34852e087819c803362e8528a1df7 | |
parent | 473674ab588ab6085c46a601afe274fa0cbb953b (diff) |
mm: swap: Initialize local locks early
Cc: stable-rt@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | mm/swap.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mm/swap.c b/mm/swap.c index 069390f44cfe..662972f4ff24 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -772,6 +772,15 @@ unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, EXPORT_SYMBOL(pagevec_lookup); +/* Early setup for the local locks */ +static int __init swap_init_locks(void) +{ + local_irq_lock_init(rotate_lock); + local_irq_lock_init(swap_lock); + return 1; +} +early_initcall(swap_init_locks); + unsigned pagevec_lookup_tag(struct pagevec *pvec, struct address_space *mapping, pgoff_t *index, int tag, unsigned nr_pages) { @@ -789,9 +798,6 @@ void __init swap_setup(void) { unsigned long megs = totalram_pages >> (20 - PAGE_SHIFT); - local_irq_lock_init(rotate_lock); - local_irq_lock_init(swap_lock); - #ifdef CONFIG_SWAP bdi_init(swapper_space.backing_dev_info); #endif |