summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2003-01-04 19:23:19 +0000
committerAlan Cox <alc@FreeBSD.org>2003-01-04 19:23:19 +0000
commit4dbeceee96baf086992afe54f11e55c5a0a1ad40 (patch)
tree4ffa0bb66ce129ad7754565ea1e69043639fb5ba
parent009f3e7a1e36434e46fae9eb4640cefa9788f255 (diff)
Notes
-rw-r--r--sys/vm/vm_object.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 0bd5a07840cf..1959cd3abebe 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -433,12 +433,12 @@ vm_object_deallocate(vm_object_t object)
{
vm_object_t temp;
- mtx_lock(&Giant);
+ vm_object_lock(object);
while (object != NULL) {
if (object->type == OBJT_VNODE) {
vm_object_vndeallocate(object);
- mtx_unlock(&Giant);
+ vm_object_unlock(object);
return;
}
@@ -453,7 +453,7 @@ vm_object_deallocate(vm_object_t object)
*/
object->ref_count--;
if (object->ref_count > 1) {
- mtx_unlock(&Giant);
+ vm_object_unlock(object);
return;
} else if (object->ref_count == 1) {
if (object->shadow_count == 0) {
@@ -494,7 +494,7 @@ vm_object_deallocate(vm_object_t object)
continue;
}
}
- mtx_unlock(&Giant);
+ vm_object_unlock(object);
return;
}
doterm:
@@ -518,7 +518,7 @@ doterm:
vm_object_terminate(object);
object = temp;
}
- mtx_unlock(&Giant);
+ vm_object_unlock(object);
}
/*