From: Arnd Bergmann Date: Wed, 20 Feb 2013 02:14:40 +0000 (+1100) Subject: swap: fix "add per-partition lock for swapfile" for nommu X-Git-Tag: next-20130220~1^2~461 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a13c7508353e47d494b0a6e3737be9c303269b6a;p=karo-tx-linux.git 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 --- 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