diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-01-10 09:50:51 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2014-03-24 18:27:04 -0400 |
commit | 39295b0062f40efd69caa1570b5c1be196250c69 (patch) | |
tree | 60798d04779db1d616d8b064a314f0d50522a89f | |
parent | 8836131b53cbd97202106a6f2dcbb8ab85ceed44 (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 7e0e3f4c5118..bdf78b569a16 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -843,6 +843,15 @@ unsigned pagevec_lookup_tag(struct pagevec *pvec, struct address_space *mapping, } EXPORT_SYMBOL(pagevec_lookup_tag); +/* 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); + /* * Perform any setup for the swap system */ @@ -850,9 +859,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 |