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:03:36 -0500 |
commit | bf81131b4e8b8a0432863d6a68e7ca51d6d39616 (patch) | |
tree | 8c2ecaf3c06492f236b76dabe3ac441bc5b9ce9e | |
parent | 9d7c6cb6c0f367c46cdda74ea51b0cca9757d4d4 (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 2051da9c48e2..62dc70c757d3 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -767,6 +767,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 */ @@ -774,9 +783,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 |