summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-01-10 09:50:51 +0100
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-12-06 20:56:30 -0500
commit1361cc0c797b14e39d34926ea6e1cc7ca5f17fae (patch)
tree3a74d5de4963264c1d2149fc0212b034b6a077a2 /mm
parent9d37a4ed9078fe26ce9a7e2d0db4504aa74435a9 (diff)
downloadlinux-rt-1361cc0c797b14e39d34926ea6e1cc7ca5f17fae.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>
Diffstat (limited to 'mm')
-rw-r--r--mm/swap.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mm/swap.c b/mm/swap.c
index b6f1624797d7..0645c6c82df4 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -794,6 +794,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
*/
@@ -801,9 +810,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