patch-2.4.0-test6 linux/arch/sparc64/mm/generic.c
Next file: linux/arch/sparc64/mm/init.c
Previous file: linux/arch/sparc64/mm/fault.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Wed Aug 9 13:49:56 2000
- Orig file:
v2.4.0-test5/linux/arch/sparc64/mm/generic.c
- Orig date:
Wed Dec 29 13:13:14 1999
diff -u --recursive --new-file v2.4.0-test5/linux/arch/sparc64/mm/generic.c linux/arch/sparc64/mm/generic.c
@@ -1,4 +1,4 @@
-/* $Id: generic.c,v 1.13 1999/12/20 05:02:33 davem Exp $
+/* $Id: generic.c,v 1.14 2000/08/09 00:00:15 davem Exp $
* generic.c: Generic Sparc mm routines that are not dependent upon
* MMU type but are Sparc specific.
*
@@ -18,14 +18,14 @@
if (pte_none(page))
return;
if (pte_present(page)) {
- unsigned long nr = pte_pagenr(page);
- if (nr >= max_mapnr || PageReserved(mem_map+nr))
+ struct page *ptpage = pte_page(page);
+ if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage))
return;
/*
* free_page() used to be able to clear swap cache
* entries. We may now have to do it manually.
*/
- free_page_and_swap_cache(mem_map+nr);
+ free_page_and_swap_cache(ptpage);
return;
}
swap_free(pte_to_swp_entry(page));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)