patch-2.4.0-test6 linux/fs/proc/array.c

Next file: linux/fs/proc/kcore.c
Previous file: linux/fs/partitions/acorn.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test5/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -421,6 +421,7 @@
 		end = PMD_SIZE;
 	do {
 		pte_t page = *pte;
+		struct page *ptpage;
 
 		address += PAGE_SIZE;
 		pte++;
@@ -432,8 +433,9 @@
 		++*pages;
 		if (pte_dirty(page))
 			++*dirty;
-		if ((pte_pagenr(page) >= max_mapnr) || 
-					PageReserved(pte_pagenr(page) + mem_map))
+		ptpage = pte_page(page);
+		if ((!VALID_PAGE(ptpage)) || 
+					PageReserved(ptpage))
 			continue;
 		if (page_count(pte_page(page)) > 1)
 			++*shared;

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