diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-01-10 09:50:51 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-02-05 10:54:41 -0500 |
commit | 530d4016457776045e697ddcd9432abe583f3a26 (patch) | |
tree | 81e0c1436bc1fe1f266915e0162c090c6d04604c | |
parent | e6927ab0c6ed0005c7f0028668a23ac0f8c97fae (diff) | |
download | linux-rt-530d4016457776045e697ddcd9432abe583f3a26.tar.gz |
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 |