MFamd64/i386

Avoid recomputing PHYS_TO_VM_PAGE() unnecessarily in pmap_protect().
This commit is contained in:
Alan Cox 2004-09-19 05:34:49 +00:00
parent 346763649a
commit 6134d96917

View File

@ -1629,7 +1629,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
oldpte |= (PG_FOR | PG_FOE);
}
if ((oldpte & PG_FOW) == 0) {
m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte));
if (m == NULL)
m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte));
if (pmap_track_modified(sva))
vm_page_dirty(m);
oldpte |= PG_FOW;