summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2004-08-16 10:00:44 +0000
committerdwmalone <dwmalone@FreeBSD.org>2004-08-16 10:00:44 +0000
commit2aab4410a1acd02e0b1d9ca456b1679eba70d1e4 (patch)
tree9bae2516a6d54f87150a65e0b2926b64f7288386
parent78988cd40a872687a5487a25e0aadefbd9eb2b1b (diff)
downloadFreeBSD-src-2aab4410a1acd02e0b1d9ca456b1679eba70d1e4.zip
FreeBSD-src-2aab4410a1acd02e0b1d9ca456b1679eba70d1e4.tar.gz
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 <tedu@zeitbombe.org> MFC after: 2 weeks
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index c602ae3..5d2c791 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);
}
OpenPOWER on IntegriCloud