summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfvdl <fvdl@NetBSD.org>2000-02-25 22:33:43 +0000
committerfvdl <fvdl@NetBSD.org>2000-02-25 22:33:43 +0000
commitbb4e32450816d50e0cc69cdeb04657a98d71da74 (patch)
tree5663fcd0cf562e0200120f9444f8b45455f6803d
parentf1717bc7fd06d918cd7c1e7923ee01c7ca6f22fb (diff)
Fix pasto: some lines of the procfs hash code were copied from the
UFS code, and I forgot to rename the "ihash" variable, causing weird effects, because 3/4th of the UFS hash table would become unreachable after procfs was loaded as an LKM.
-rw-r--r--sys/miscfs/procfs/procfs_subr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c
index 6a4e35fb01e..16de4ff0687 100644
--- a/sys/miscfs/procfs/procfs_subr.c
+++ b/sys/miscfs/procfs/procfs_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_subr.c,v 1.29 2000/01/25 21:52:04 fvdl Exp $ */
+/* $NetBSD: procfs_subr.c,v 1.30 2000/02/25 22:33:43 fvdl Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou. All rights reserved.
@@ -56,8 +56,8 @@ void procfs_hashrem __P((struct pfsnode *));
struct vnode *procfs_hashget __P((pid_t, pfstype, struct mount *));
LIST_HEAD(pfs_hashhead, pfsnode) *pfs_hashtbl;
-u_long ihash; /* size of hash table - 1 */
-#define PFSPIDHASH(pid) (&pfs_hashtbl[(pid) & ihash])
+u_long pfs_ihash; /* size of hash table - 1 */
+#define PFSPIDHASH(pid) (&pfs_hashtbl[(pid) & pfs_ihash])
struct lock pfs_hashlock;
struct simplelock pfs_hash_slock;
@@ -316,7 +316,8 @@ void
procfs_hashinit()
{
lockinit(&pfs_hashlock, PINOD, "pfs_hashlock", 0, 0);
- pfs_hashtbl = hashinit(desiredvnodes / 4, M_UFSMNT, M_WAITOK, &ihash);
+ pfs_hashtbl = hashinit(desiredvnodes / 4, M_UFSMNT, M_WAITOK,
+ &pfs_ihash);
simple_lock_init(&pfs_hash_slock);
}