diff options
-rw-r--r-- | sys/kern/vfs_init.c | 41 | ||||
-rw-r--r-- | sys/sys/systm.h | 3 |
2 files changed, 16 insertions, 28 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, diff --git a/sys/sys/systm.h b/sys/sys/systm.h index abddd429c1c..f880d8b114d 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: systm.h,v 1.73 2007/11/27 18:04:01 art Exp $ */ +/* $OpenBSD: systm.h,v 1.74 2008/05/16 17:45:37 thib Exp $ */ /* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */ /*- @@ -147,7 +147,6 @@ int eopnotsupp(void *); int lkmenodev(void); struct vnodeopv_desc; -void vfs_opv_init(void); void vfs_opv_init_explicit(struct vnodeopv_desc *); void vfs_opv_init_default(struct vnodeopv_desc *); void vfs_op_init(void); |