From 0915c596fe32f902ce8912d51ec1dec4dc21c8ef Mon Sep 17 00:00:00 2001 From: ad Date: Sun, 4 May 2008 12:43:58 +0000 Subject: [PATCH] Ensure that there is always a link_set_vfsops, until we kill VFS_ATTACH(). --- sys/kern/vfs_init.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 805215ae94c3..1f5b49fa35c7 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 -__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 #include @@ -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);