summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_fault.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/vm/vm_fault.c b/vm/vm_fault.c
index 40d1cbc..1ed9e03 100644
--- a/vm/vm_fault.c
+++ b/vm/vm_fault.c
@@ -462,15 +462,16 @@ vm_fault_return_t vm_fault_page(
m = real_m;
/*
- * Drop the lock while zero filling
- * page. Then break because this
- * is the page we wanted. Checking
- * the page lock is a waste of time;
- * this page was either absent or
- * newly allocated -- in both cases
- * it can't be page locked by a pager.
+ * Zero fill the page. Then
+ * break because this is the
+ * page we wanted. Checking
+ * the page lock is a waste
+ * of time; this page was
+ * either absent or newly
+ * allocated -- in both cases
+ * it can't be page locked by
+ * a pager.
*/
- vm_object_unlock(object);
vm_page_zero_fill(m);
@@ -478,7 +479,6 @@ vm_fault_return_t vm_fault_page(
vm_stat.zero_fill_count++;
current_task()->zero_fills++;
- vm_object_lock(object);
pmap_clear_modify(m->phys_addr);
break;
} else {
@@ -755,12 +755,10 @@ vm_fault_return_t vm_fault_page(
return(VM_FAULT_MEMORY_SHORTAGE);
}
- vm_object_unlock(object);
vm_page_zero_fill(m);
vm_stat_sample(SAMPLED_PC_VM_ZFILL_FAULTS);
vm_stat.zero_fill_count++;
current_task()->zero_fills++;
- vm_object_lock(object);
pmap_clear_modify(m->phys_addr);
break;
}
@@ -841,9 +839,7 @@ vm_fault_return_t vm_fault_page(
return(VM_FAULT_MEMORY_SHORTAGE);
}
- vm_object_unlock(object);
vm_page_copy(m, copy_m);
- vm_object_lock(object);
/*
* If another map is truly sharing this