From da126abaf10361cc92bc00de0fd41a76564ba883 Mon Sep 17 00:00:00 2001 From: David Malone Date: Mon, 16 Aug 2004 10:00:44 +0000 Subject: [PATCH] When looking for some extra data to include in the hash, use the address of the dirhash, rather than the first sizeof(struct dirhash *) bytes of the structure (which, thankfully, seem to be constant). Submitted by: Ted Unangst MFC after: 2 weeks --- sys/ufs/ufs/ufs_dirhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c index c602ae3d20b..5d2c79154c9 100644 --- a/sys/ufs/ufs/ufs_dirhash.c +++ b/sys/ufs/ufs/ufs_dirhash.c @@ -883,7 +883,7 @@ ufsdirhash_hash(struct dirhash *dh, char *name, int namelen) * another in the table, which is bad for linear probing. */ hash = fnv_32_buf(name, namelen, FNV1_32_INIT); - hash = fnv_32_buf(dh, sizeof(dh), hash); + hash = fnv_32_buf(&dh, sizeof(dh), hash); return (hash % dh->dh_hlen); }