Author: kib
Date: Wed Dec 14 23:34:25 2016
New Revision: 310097
URL: https://svnweb.freebsd.org/changeset/base/310097
Log:
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
Modified:
head/sys/vm/default_pager.c
Modified: head/sys/vm/default_pager.c
==============================================================================
--- head/sys/vm/default_pager.c Wed Dec 14 22:49:20 2016 (r310096)
+++ head/sys/vm/default_pager.c Wed Dec 14 23:34:25 2016 (r310097)
@@ -85,10 +85,8 @@ default_pager_alloc(void *handle, vm_oof
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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"