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.
This commit is contained in:
fvdl 2000-02-25 22:33:43 +00:00
parent f1717bc7fd
commit bb4e324508

View File

@ -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);
}