diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-02-21 16:10:36 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-02-21 16:10:42 +1100 |
commit | 846bb7788aced3ff6bfb5f674899ee5bc783e98e (patch) | |
tree | a19c658572beb8963dabe962f626265845b5d6b2 /mm/swap.c | |
parent | 8cc156311126614ff6a59560e4eb20731156f799 (diff) | |
parent | da691fd2697453e910a4bd0c8daaa80da48a0935 (diff) |
Merge branch 'akpm/master'
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/swap.c b/mm/swap.c index 6310dc2008ff..92a9be551846 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -30,6 +30,7 @@ #include <linux/backing-dev.h> #include <linux/memcontrol.h> #include <linux/gfp.h> +#include <linux/uio.h> #include "internal.h" @@ -855,9 +856,14 @@ EXPORT_SYMBOL(pagevec_lookup_tag); void __init swap_setup(void) { unsigned long megs = totalram_pages >> (20 - PAGE_SHIFT); - #ifdef CONFIG_SWAP - bdi_init(swapper_space.backing_dev_info); + int i; + + bdi_init(swapper_spaces[0].backing_dev_info); + for (i = 0; i < MAX_SWAPFILES; i++) { + spin_lock_init(&swapper_spaces[i].tree_lock); + INIT_LIST_HEAD(&swapper_spaces[i].i_mmap_nonlinear); + } #endif /* Use a smaller cluster for small-memory machines */ |