aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia64/pmap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index 2e3cb882ce04..6d52c72155a3 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -1444,18 +1444,15 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
if (pmap == NULL)
return;
- oldpmap = pmap_install(pmap);
-
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
pmap_remove(pmap, sva, eva);
- pmap_install(oldpmap);
return;
}
- if (prot & VM_PROT_WRITE) {
- pmap_install(oldpmap);
+ if (prot & VM_PROT_WRITE)
return;
- }
+
+ oldpmap = pmap_install(pmap);
newprot = pte_prot(pmap, prot);