From: Arnd Bergmann Date: Thu, 7 Feb 2013 01:26:52 +0000 (+1100) Subject: swap: fix "add per-partition lock for swapfile" for nommu X-Git-Tag: next-20130218~1^2~375 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c2efc4b172c48972b230eb02ba88cb4004c30e28;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