diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-01-10 09:50:51 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2013-04-23 11:35:22 -0400 |
commit | f6717484ecae00e1f5affe21638ba27d6aae3cea (patch) | |
tree | 00fed191cdd9b89ffc01a7f946d2e95c7c8aed9d | |
parent | 185045c5ab926f49e8d0b5577bb924e6f41abed6 (diff) | |
download | linux-rt-f6717484ecae00e1f5affe21638ba27d6aae3cea.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 |