diff options
author | alc <alc@FreeBSD.org> | 2003-07-27 05:43:58 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-07-27 05:43:58 +0000 |
commit | 56615188dca4d47b32b74f0700ca0f0e174f6b08 (patch) | |
tree | 753a990884e2aa45e99700d1481862573c97d874 /sys | |
parent | 0794d132914a8e8798ec55bc807dca3868fcf098 (diff) | |
download | FreeBSD-src-56615188dca4d47b32b74f0700ca0f0e174f6b08.zip FreeBSD-src-56615188dca4d47b32b74f0700ca0f0e174f6b08.tar.gz |
Allow vm_object_reference() on kernel_object without Giant.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_object.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 23b88b7..7e78adc 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -364,7 +364,8 @@ vm_object_reference(vm_object_t object) { if (object == NULL) return; - if (object != kmem_object) + if (object != kernel_object && + object != kmem_object) mtx_lock(&Giant); VM_OBJECT_LOCK(object); object->ref_count++; @@ -374,7 +375,8 @@ vm_object_reference(vm_object_t object) printf("vm_object_reference: delay in getting object\n"); } } - if (object != kmem_object) + if (object != kernel_object && + object != kmem_object) mtx_unlock(&Giant); } |