patch-2.4.0-test4 linux/mm/memory.c

Next file: linux/mm/page_alloc.c
Previous file: linux/kernel/timer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/mm/memory.c linux/mm/memory.c
@@ -373,12 +373,12 @@
 	spin_unlock(&mm->page_table_lock);
 	/*
 	 * Update rss for the mm_struct (not necessarily current->mm)
+	 * Notice that rss is an unsigned long.
 	 */
-	if (mm->rss > 0) {
+	if (mm->rss > freed)
 		mm->rss -= freed;
-		if (mm->rss < 0)
-			mm->rss = 0;
-	}
+	else
+		mm->rss = 0;
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)