patch-2.2.0-final linux/mm/filemap.c

Next file: linux/mm/page_alloc.c
Previous file: linux/include/net/irda/irda.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre9/linux/mm/filemap.c linux/mm/filemap.c
@@ -125,7 +125,7 @@
 	struct page * page;
 	int count;
 
-	count = (limit << 1) >> priority;
+	count = limit >> priority;
 
 	page = mem_map + clock;
 	do {
@@ -147,7 +147,6 @@
 			clock = page - mem_map;
 		}
 		
-		count--;
 		referenced = test_and_clear_bit(PG_referenced, &page->flags);
 
 		if (PageLocked(page))
@@ -159,6 +158,8 @@
 		/* We can't free pages unless there's just one user */
 		if (atomic_read(&page->count) != 1)
 			continue;
+
+		count--;
 
 		/*
 		 * Is it a page swap page? If so, we want to

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