From a13c7508353e47d494b0a6e3737be9c303269b6a Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 20 Feb 2013 13:14:40 +1100 Subject: [PATCH] swap: fix "add per-partition lock for swapfile" for nommu The patch "swap: add per-partition lock for swapfile" made the nr_swap_pages variable unaccessible but forgot to change the mm/nommu.c file that uses it. This does the trivial conversion to let us build nommu kernels again Signed-off-by: Arnd Bergmann Cc: Shaohua Li Signed-off-by: Andrew Morton --- mm/nommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/nommu.c b/mm/nommu.c index 18c1b932e2c4..87854a55829d 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1907,7 +1907,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) */ free -= global_page_state(NR_SHMEM); - free += nr_swap_pages; + free += get_nr_swap_pages(); /* * Any slabs which are created with the -- 2.39.5