summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/uvm/uvm_object.c')
-rw-r--r--sys/uvm/uvm_object.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/uvm/uvm_object.c b/sys/uvm/uvm_object.c
index ffd76a259e5..e6844f08c52 100644
--- a/sys/uvm/uvm_object.c
+++ b/sys/uvm/uvm_object.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_object.c,v 1.6 2010/05/01 13:13:10 oga Exp $ */
+/* $OpenBSD: uvm_object.c,v 1.7 2013/05/30 15:17:59 tedu Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -73,7 +73,6 @@ uvm_objwire(struct uvm_object *uobj, off_t start, off_t end,
left = (end - start) >> PAGE_SHIFT;
- simple_lock(&uobj->vmobjlock);
while (left) {
npages = MIN(FETCH_PAGECOUNT, left);
@@ -87,7 +86,6 @@ uvm_objwire(struct uvm_object *uobj, off_t start, off_t end,
if (error)
goto error;
- simple_lock(&uobj->vmobjlock);
for (i = 0; i < npages; i++) {
KASSERT(pgs[i] != NULL);
@@ -101,9 +99,7 @@ uvm_objwire(struct uvm_object *uobj, off_t start, off_t end,
while (pgs[i]->loan_count) {
pg = uvm_loanbreak(pgs[i]);
if (!pg) {
- simple_unlock(&uobj->vmobjlock);
uvm_wait("uobjwirepg");
- simple_lock(&uobj->vmobjlock);
continue;
}
}
@@ -133,7 +129,6 @@ uvm_objwire(struct uvm_object *uobj, off_t start, off_t end,
left -= npages;
offset += npages << PAGE_SHIFT;
}
- simple_unlock(&uobj->vmobjlock);
return 0;
@@ -156,7 +151,6 @@ uvm_objunwire(struct uvm_object *uobj, off_t start, off_t end)
struct vm_page *pg;
off_t offset;
- simple_lock(&uobj->vmobjlock);
uvm_lock_pageq();
for (offset = start; offset < end; offset += PAGE_SIZE) {
pg = uvm_pagelookup(uobj, offset);
@@ -167,6 +161,5 @@ uvm_objunwire(struct uvm_object *uobj, off_t start, off_t end)
uvm_pageunwire(pg);
}
uvm_unlock_pageq();
- simple_unlock(&uobj->vmobjlock);
}
#endif /* !SMALL_KERNEL */