summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-05-04 12:43:58 +0000
committerad <ad@NetBSD.org>2008-05-04 12:43:58 +0000
commit0915c596fe32f902ce8912d51ec1dec4dc21c8ef (patch)
treea55cd9529f8ddf2bb3f18215cb3cce62955c0183 /sys
parent46856805797c6ba10f51875af706535da2c22de9 (diff)
Ensure that there is always a link_set_vfsops, until we kill VFS_ATTACH().
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_init.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 805215ae94c..1f5b49fa35c 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -1,7 +1,7 @@
-/* $NetBSD: vfs_init.c,v 1.38 2008/04/28 20:24:05 martin Exp $ */
+/* $NetBSD: vfs_init.c,v 1.39 2008/05/04 12:43:58 ad Exp $ */
/*-
- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.38 2008/04/28 20:24:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.39 2008/05/04 12:43:58 ad Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -117,6 +117,10 @@ const struct vnodeopv_desc * const vfs_special_vnodeopv_descs[] = {
struct vfs_list_head vfs_list = /* vfs list */
LIST_HEAD_INITIALIZER(vfs_list);
+/* XXX Until this particular link set goes away. */
+static struct vfsops vfsops_dummy;
+__link_set_add_rodata(vfsops, vfsops_dummy);
+
/*
* This code doesn't work if the defn is **vnodop_defns with cc.
* The problem is because of the compiler sometimes putting in an
@@ -338,6 +342,8 @@ vfsinit(void)
*/
module_init_class(MODULE_CLASS_VFS);
__link_set_foreach(vfsp, vfsops) {
+ if (*vfsp == &vfsops_dummy)
+ continue;
if (vfs_attach(*vfsp)) {
printf("multiple `%s' file systems",
(*vfsp)->vfs_name);