patch-2.0.28 linux/mm/swapfile.c

Next file: linux/mm/vmscan.c
Previous file: linux/include/linux/ldt.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.27/linux/mm/swapfile.c linux/mm/swapfile.c
@@ -81,7 +81,9 @@
 
 	type = swap_list.next;
 	if (type < 0)
-	  return 0;
+		return 0;
+	if (nr_swap_pages == 0)
+		return 0;
 
 	while (1) {
 		p = &swap_info[type];

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov