From 8c2367ad380541b5c6c41a810df43a755581aa9f Mon Sep 17 00:00:00 2001 From: wollman Date: Wed, 21 Sep 1994 23:22:52 +0000 Subject: Fix a few niggling little bugs: - set args->lkm_offset correctly so that VFS modules can be unloaded - initialize _fs_vfsops.vfc_refcount correctly so that VFS modules can be unloaded - include kernel.h in a few placves to get the correct definition of DATA_SET --- sys/fs/nullfs/null_vnops.c | 3 ++- sys/fs/umapfs/umap_vnops.c | 3 ++- sys/fs/unionfs/union_vnops.c | 3 ++- sys/kern/kern_lkm.c | 9 +++------ sys/miscfs/nullfs/null_vnops.c | 3 ++- sys/miscfs/umapfs/umap_vnops.c | 3 ++- sys/miscfs/union/union_vnops.c | 3 ++- sys/sys/mount.h | 4 ++-- 8 files changed, 17 insertions(+), 14 deletions(-) (limited to 'sys') diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 63281ac..78feac2 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -35,7 +35,7 @@ * * @(#)null_vnops.c 8.1 (Berkeley) 6/10/93 * - * $Id: null_vnops.c,v 1.3 1994/08/20 03:48:51 davidg Exp $ + * $Id: null_vnops.c,v 1.4 1994/09/21 03:47:02 wollman Exp $ */ /* @@ -162,6 +162,7 @@ #include #include +#include #include #include #include diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c index cf558ab..fa69292 100644 --- a/sys/fs/umapfs/umap_vnops.c +++ b/sys/fs/umapfs/umap_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)umap_vnops.c 8.3 (Berkeley) 1/5/94 - * $Id: umap_vnops.c,v 1.4 1994/08/20 03:48:54 davidg Exp $ + * $Id: umap_vnops.c,v 1.5 1994/09/21 03:47:12 wollman Exp $ */ /* @@ -43,6 +43,7 @@ #include #include +#include #include #include #include diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 0e71ee8..9aa19f1 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.6 (Berkeley) 2/17/94 - * $Id: union_vnops.c,v 1.3 1994/08/02 07:45:47 davidg Exp $ + * $Id: union_vnops.c,v 1.4 1994/09/21 03:47:14 wollman Exp $ */ #include @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index 5b48196..98ede43 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -578,11 +578,8 @@ _lkm_vfs(lkmtp, cmd) } } - if (args->lkm_offset != vfc->vfc_index) - return EINVAL; - - i = args->lkm_offset; - if (!args->lkm_offset) { + i = args->lkm_offset = vfc->vfc_index; + if (i < 0) { for (i = MOUNT_MAXTYPE - 1; i >= 0; i--) { if(vfsconf[i] == &void_vfsconf) break; @@ -592,6 +589,7 @@ _lkm_vfs(lkmtp, cmd) return EINVAL; } args->lkm_offset = vfc->vfc_index = i; + vfsconf[i] = vfc; vfssw[i] = vfc->vfc_vfsops; @@ -609,7 +607,6 @@ _lkm_vfs(lkmtp, cmd) (*(vfssw[vfc->vfc_index]->vfs_init))(); /* done! */ - args->lkm_offset = i; /* slot in vfssw[] */ break; case LKM_E_UNLOAD: diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index 63281ac..78feac2 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -35,7 +35,7 @@ * * @(#)null_vnops.c 8.1 (Berkeley) 6/10/93 * - * $Id: null_vnops.c,v 1.3 1994/08/20 03:48:51 davidg Exp $ + * $Id: null_vnops.c,v 1.4 1994/09/21 03:47:02 wollman Exp $ */ /* @@ -162,6 +162,7 @@ #include #include +#include #include #include #include diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c index cf558ab..fa69292 100644 --- a/sys/miscfs/umapfs/umap_vnops.c +++ b/sys/miscfs/umapfs/umap_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)umap_vnops.c 8.3 (Berkeley) 1/5/94 - * $Id: umap_vnops.c,v 1.4 1994/08/20 03:48:54 davidg Exp $ + * $Id: umap_vnops.c,v 1.5 1994/09/21 03:47:12 wollman Exp $ */ /* @@ -43,6 +43,7 @@ #include #include +#include #include #include #include diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index 0e71ee8..9aa19f1 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.6 (Berkeley) 2/17/94 - * $Id: union_vnops.c,v 1.3 1994/08/02 07:45:47 davidg Exp $ + * $Id: union_vnops.c,v 1.4 1994/09/21 03:47:14 wollman Exp $ */ #include @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 721ec83..3f20f16 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mount.h 8.13 (Berkeley) 3/27/94 - * $Id: mount.h,v 1.7 1994/09/19 15:41:56 dfr Exp $ + * $Id: mount.h,v 1.8 1994/09/21 03:47:31 wollman Exp $ */ #ifndef _SYS_MOUNT_H_ @@ -262,7 +262,7 @@ struct vfsops { &vfsops, \ #fsname, \ index, \ - 1, \ + 0, \ flags \ }; \ extern struct linker_set MODVNOPS; \ -- cgit v1.1