summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_fault.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 0896cba..f1f13a6 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -273,7 +273,7 @@ RetryFault:;
fs.lookup_still_valid = TRUE;
if (wired)
- fault_type = prot;
+ fault_type = prot | (fault_type & VM_PROT_COPY);
fs.first_m = NULL;
@@ -759,8 +759,11 @@ vnode_locked:
*/
pmap_copy_page(fs.m, fs.first_m);
fs.first_m->valid = VM_PAGE_BITS_ALL;
- }
- if (fs.m) {
+ if (wired && (fault_flags &
+ VM_FAULT_CHANGE_WIRING) == 0) {
+ vm_page_wire(fs.first_m);
+ vm_page_unwire(fs.m, FALSE);
+ }
/*
* We no longer need the old page or object.
*/
OpenPOWER on IntegriCloud