Remove locking around accounting initialization of the default object.
The object is not yet fully constructed and must not be available to other threads. This makes default_pager_alloc() almost identical to swap_pager_alloc_init(). Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
ea79716e67
commit
3bda92f604
@ -85,10 +85,8 @@ default_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
object = vm_object_allocate(OBJT_DEFAULT,
|
||||
OFF_TO_IDX(round_page(offset + size)));
|
||||
if (cred != NULL) {
|
||||
VM_OBJECT_WLOCK(object);
|
||||
object->cred = cred;
|
||||
object->charge = size;
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
}
|
||||
return (object);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user