From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx202.postini.com [74.125.245.202]) by kanga.kvack.org (Postfix) with SMTP id AAAE46B0005 for ; Fri, 25 Jan 2013 17:18:18 -0500 (EST) From: Arnd Bergmann Subject: [PATCH] swap: fix "add per-partition lock for swapfile" for nommu Date: Fri, 25 Jan 2013 22:18:07 +0000 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201301252218.07296.arnd@arndb.de> Sender: owner-linux-mm@kvack.org List-ID: To: Shaohua Li Cc: Andrew Morton , Hugh Dickins , Rik van Riel , Minchan Kim , Greg Kroah-Hartman , Seth Jennings , Konrad Rzeszutek Wilk , Xiao Guangrong , Dan Magenheimer , linux-mm@kvack.org 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 diff --git a/mm/nommu.c b/mm/nommu.c index b7fdaa7..bf74898 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1906,7 +1906,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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org