linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/nommu: Use get_nr_swap_pages()
@ 2013-01-30  9:41 Thierry Reding
  0 siblings, 0 replies; only message in thread
From: Thierry Reding @ 2013-01-30  9:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Shaohua Li, linux-mm, linux-kernel

This fixes a build failure introduced by commit ac07b1f ("swap: add per-
partition lock for swapfile") which changed the access pattern of the
nr_swap_pages variable but failed to update the no-MMU case.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
 mm/nommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
1.8.1.2

--
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] only message in thread

only message in thread, other threads:[~2013-01-30  9:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30  9:41 [PATCH] mm/nommu: Use get_nr_swap_pages() Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox