summaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-08 22:17:26 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-08 22:17:26 +0000
commit984760dbf5e48f6224dfe9e26e03536b3d38b6cd (patch)
treea99674322e524c4c90009b3bdae5fab0eebf2094 /mm/vmalloc.c
parenta7ce7d5e94c98ef5b867f61b2ebecd563f4b6ec9 (diff)
Merge with Linux 2.4.0-test6-pre8.
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 57f3ca56c..817a3966b 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -41,10 +41,9 @@ static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned lo
if (pte_none(page))
continue;
if (pte_present(page)) {
- unsigned long map_nr = pte_pagenr(page);
- if ((map_nr < max_mapnr) &&
- (!PageReserved(mem_map + map_nr)))
- __free_page(mem_map + map_nr);
+ struct page *ptpage = pte_page(page);
+ if (VALID_PAGE(ptpage) && (!PageReserved(ptpage)))
+ __free_page(ptpage);
continue;
}
printk(KERN_CRIT "Whee.. Swapped out page in kernel page table\n");