diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-21 11:06:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-09-21 11:06:23 +0000 |
commit | 04cb1df49ad5907d2b4bee22fdfe4695ad0df432 (patch) | |
tree | 1728e0c6a0b7bcff1340cc629eb752d02da5171b /sys/nfs | |
parent | 346174e1eed58efcf2628f8f90d9a9d6639e4272 (diff) |
fix NFSSERVER w/o NFSCLIENT; netbsd pr#1780, cgd@netbsd (yes, a 10month
old PR and the fix is mostly unchanged).
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_subs.c | 23 | ||||
-rw-r--r-- | sys/nfs/nfs_var.h | 3 | ||||
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 4 |
3 files changed, 18 insertions, 12 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 5b7414c5c65..379a2332de8 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.10 1996/07/27 11:09:39 deraadt Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.11 1996/09/21 11:06:19 deraadt Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -1116,17 +1116,9 @@ nfs_init() nfs_ticks = (hz * NFS_TICKINTVL + 500) / 1000; if (nfs_ticks < 1) nfs_ticks = 1; -#ifdef NFSCLIENT - /* Ensure async daemons disabled */ - for (i = 0; i < NFS_MAXASYNCDAEMON; i++) - nfs_iodwant[i] = (struct proc *)0; - TAILQ_INIT(&nfs_bufq); - nfs_nhinit(); /* Init the nfsnode table */ -#endif /* NFSCLIENT */ #ifdef NFSSERVER nfsrv_init(0); /* Init server data structures */ nfsrv_initcache(); /* Init the server request cache */ -#endif /* NFSSERVER */ /* * Initialize the nqnfs server stuff. @@ -1138,6 +1130,7 @@ nfs_init() CIRCLEQ_INIT(&nqtimerhead); nqfhhashtbl = hashinit(NQLCHSZ, M_NQLEASE, &nqfhhash); } +#endif /* NFSSERVER */ /* * Initialize reply list and start timer @@ -1147,6 +1140,18 @@ nfs_init() } #ifdef NFSCLIENT +void +nfs_vfs_init() +{ + register int i; + + /* Ensure async daemons disabled */ + for (i = 0; i < NFS_MAXASYNCDAEMON; i++) + nfs_iodwant[i] = (struct proc *)0; + TAILQ_INIT(&nfs_bufq); + nfs_nhinit(); /* Init the nfsnode table */ +} + /* * Attribute cache routines. * nfs_loadattrcache() - loads or updates the cache contents from attributes diff --git a/sys/nfs/nfs_var.h b/sys/nfs/nfs_var.h index e349ccfaa0c..5e944220a3b 100644 --- a/sys/nfs/nfs_var.h +++ b/sys/nfs/nfs_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_var.h,v 1.2 1996/03/31 13:15:58 mickey Exp $ */ +/* $OpenBSD: nfs_var.h,v 1.3 1996/09/21 11:06:20 deraadt Exp $ */ /* $NetBSD: nfs_var.h,v 1.3 1996/02/18 11:53:54 fvdl Exp $ */ /* @@ -274,6 +274,7 @@ int nfsm_uiotombuf __P((struct uio *, struct mbuf **, int, caddr_t *)); int nfsm_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); int nfs_adv __P((struct mbuf **, caddr_t *, int, int)); int nfsm_strtmbuf __P((struct mbuf **, char **, char *, long)); +void nfs_vfs_init __P((void)); void nfs_init __P((void)); int nfs_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *, struct vattr *)); diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 5c7714346da..5e9fd779b7d 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.12 1996/06/02 16:47:23 niklas Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.13 1996/09/21 11:06:22 deraadt Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -92,7 +92,7 @@ struct vfsops nfs_vfsops = { nfs_vget, nfs_fhtovp, nfs_vptofh, - nfs_init, + nfs_vfs_init, #ifdef notyet nfs_sysctl #endif |