]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
swap: fix "add per-partition lock for swapfile" for nommu
authorArnd Bergmann <arnd@arndb.de>
Wed, 20 Feb 2013 02:14:40 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:47 +0000 (16:52 +1100)
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 <arnd@arndb.de>
Cc: Shaohua Li <shli@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/nommu.c

index 18c1b932e2c4450de1aa28d8e250420ced267b47..87854a55829d4bd54b8c2f45f3ced8673bdcd493 100644 (file)
@@ -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