linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] swap: fix "add per-partition lock for swapfile" for nommu
@ 2013-01-25 22:18 Arnd Bergmann
  2013-01-25 22:45 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2013-01-25 22:18 UTC (permalink / raw)
  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

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>

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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] swap: fix "add per-partition lock for swapfile" for nommu
  2013-01-25 22:18 [PATCH] swap: fix "add per-partition lock for swapfile" for nommu Arnd Bergmann
@ 2013-01-25 22:45 ` Rik van Riel
  0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2013-01-25 22:45 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Shaohua Li, Andrew Morton, Hugh Dickins, Minchan Kim,
	Greg Kroah-Hartman, Seth Jennings, Konrad Rzeszutek Wilk,
	Xiao Guangrong, Dan Magenheimer, linux-mm

On 01/25/2013 05:18 PM, Arnd Bergmann wrote:
> 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>

Reviewed-by: Rik van Riel <riel@redhat.com>


-- 
All rights reversed

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-25 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 22:18 [PATCH] swap: fix "add per-partition lock for swapfile" for nommu Arnd Bergmann
2013-01-25 22:45 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).