Skip to contentSkip to conversation

mm/nommu: Use get_nr_swap_pages()

PATCH New Thierry Reding 1 participant 1 message Jan 30, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/nommu: Use get_nr_swap_pages()

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.

---
 mm/nommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/nommu.c +1 -1
index b7fdaa7..bf74898 100644
@@ -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
Signature · 7 lines
1.8.1.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>