patch-2.4.23 linux-2.4.23/mm/memory.c

Next file: linux-2.4.23/mm/mmap.c
Previous file: linux-2.4.23/mm/filemap.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/mm/memory.c linux-2.4.23/mm/memory.c
@@ -1287,7 +1287,8 @@
 	 */
 	/* Only go through if we didn't race with anybody else... */
 	if (pte_none(*page_table)) {
-		++mm->rss;
+		if (!PageReserved(new_page))
+			++mm->rss;
 		flush_page_to_ram(new_page);
 		flush_icache_page(vma, new_page);
 		entry = mk_pte(new_page, vma->vm_page_prot);
@@ -1414,6 +1415,7 @@
 		 */
 		if (!pgd_none(*pgd)) {
 			pmd_free(new);
+			check_pgt_cache();
 			goto out;
 		}
 	}
@@ -1448,6 +1450,7 @@
 			 */
 			if (!pmd_none(*pmd)) {
 				pte_free(new);
+				check_pgt_cache();
 				goto out;
 			}
 		}

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