summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_init.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2008-05-16 17:45:37 +0000
committerthib <thib@openbsd.org>2008-05-16 17:45:37 +0000
commit034fe094c978f0f596d1536c58f11f6cb683d1db (patch)
tree3f8cedce2315b028759c58caad3e53b87b6f9cfb /sys/kern/vfs_init.c
parentremove some old debug cruft, make some comments nicer (diff)
downloadwireguard-openbsd-034fe094c978f0f596d1536c58f11f6cb683d1db.tar.xz
wireguard-openbsd-034fe094c978f0f596d1536c58f11f6cb683d1db.zip
merge vfs_opv_init into vfs_op_init and remove the former,
as they where called consecutively in vfs_init.
Diffstat (limited to 'sys/kern/vfs_init.c')
-rw-r--r--sys/kern/vfs_init.c41
1 files changed, 15 insertions, 26 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 720e098e67f..7fee91ee5d0 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_init.c,v 1.22 2008/05/16 17:37:52 thib Exp $ */
+/* $OpenBSD: vfs_init.c,v 1.23 2008/05/16 17:45:37 thib Exp $ */
/* $NetBSD: vfs_init.c,v 1.6 1996/02/09 19:00:58 christos Exp $ */
/*
@@ -158,14 +158,26 @@ vfs_opv_init_default(struct vnodeopv_desc *vfs_opv_desc)
opv_desc_vector[VOFFSET(vop_default)];
}
+/* Initialize known vnode operations vectors. */
void
-vfs_opv_init(void)
+vfs_op_init(void)
{
int i;
+ /* Set all vnode vectors to a well known value. */
+ for (i = 0; vfs_opv_descs[i]; i++)
+ *(vfs_opv_descs[i]->opv_desc_vector_p) = NULL;
+
/*
- * Allocate the dynamic vectors and fill them in.
+ * Figure out how many ops there are by counting the table,
+ * and assign each its offset.
*/
+ for (vfs_opv_numops = 0, i = 0; vfs_op_descs[i]; i++) {
+ vfs_op_descs[i]->vdesc_offset = vfs_opv_numops;
+ vfs_opv_numops++;
+ }
+
+ /* Allocate the dynamic vectors and fill them in. */
for (i = 0; vfs_opv_descs[i]; i++)
vfs_opv_init_explicit(vfs_opv_descs[i]);
@@ -175,29 +187,7 @@ vfs_opv_init(void)
*/
for (i = 0; vfs_opv_descs[i]; i++)
vfs_opv_init_default(vfs_opv_descs[i]);
-}
-/*
- * Initialize known vnode operations vectors.
- */
-void
-vfs_op_init(void)
-{
- int i;
-
- /*
- * Set all vnode vectors to a well known value.
- */
- for (i = 0; vfs_opv_descs[i]; i++)
- *(vfs_opv_descs[i]->opv_desc_vector_p) = NULL;
- /*
- * Figure out how many ops there are by counting the table,
- * and assign each its offset.
- */
- for (vfs_opv_numops = 0, i = 0; vfs_op_descs[i]; i++) {
- vfs_op_descs[i]->vdesc_offset = vfs_opv_numops;
- vfs_opv_numops++;
- }
}
@@ -226,7 +216,6 @@ vfsinit(void)
* Build vnode operation vectors.
*/
vfs_op_init();
- vfs_opv_init(); /* finish the job */
/*
* Stop using vfsconf and maxvfsconf as a temporary storage,