summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_vnode.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-04-30 21:56:40 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-04-30 21:56:40 +0000
commit4eed52b3aaa476cb47de702e65ce4ce63bfd3fea (patch)
treecb1ddd73d5a20fd22d0b661ea898ae0d2ebe17c6 /sys/uvm/uvm_vnode.c
parent5d79ad7170d9e5ffdeb9aa5870d1a3729057e720 (diff)
Right now, if anything internal changes with a uvm object, diverse
places in the tree need to be touched to update the object initialisation with respect to that. So, make a function (uvm_initobj) that takes the refcount, object and pager ops and does this initialisation for us. This should save on maintainance in the future. looked good to fgs@. Tedu complained about the British spelling but OKed it anyway.
Diffstat (limited to 'sys/uvm/uvm_vnode.c')
-rw-r--r--sys/uvm/uvm_vnode.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 207237eb3a4..a35a6b47770 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.69 2009/08/06 15:28:14 oga Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.70 2010/04/30 21:56:39 oga Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*
@@ -270,10 +270,7 @@ uvn_attach(void *arg, vm_prot_t accessprot)
/*
* now set up the uvn.
*/
- uvn->u_obj.pgops = &uvm_vnodeops;
- RB_INIT(&uvn->u_obj.memt);
- uvn->u_obj.uo_npages = 0;
- uvn->u_obj.uo_refs = 1; /* just us... */
+ uvm_objinit(&uvn->u_obj, &uvm_vnodeops, 1);
oldflags = uvn->u_flags;
uvn->u_flags = UVM_VNODE_VALID|UVM_VNODE_CANPERSIST;
uvn->u_nio = 0;