Allow vm_object_reference() on kernel_object without Giant.

This commit is contained in:
Alan Cox 2003-07-27 05:43:58 +00:00
parent c39be346e3
commit 9c65e7a336

View File

@ -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);
}