patch-2.4.18 linux/mm/vmscan.c
Next file: linux/net/Config.in
Previous file: linux/mm/vmalloc.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Tue Jan  8 15:39:44 2002
-  Orig file: 
linux.orig/mm/vmscan.c
-  Orig date: 
Mon Feb 18 20:18:40 2002
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/mm/vmscan.c linux/mm/vmscan.c
@@ -537,7 +537,7 @@
 
 	spin_lock(&pagemap_lru_lock);
 	entry = active_list.prev;
-	while (nr_pages-- && entry != &active_list) {
+	while (nr_pages && entry != &active_list) {
 		struct page * page;
 
 		page = list_entry(entry, struct page, lru);
@@ -547,6 +547,8 @@
 			list_add(&page->lru, &active_list);
 			continue;
 		}
+
+		nr_pages--;
 
 		del_page_from_active_list(page);
 		add_page_to_inactive_list(page);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)