diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2004-08-16 10:00:44 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2004-08-16 10:00:44 +0000 |
commit | 2aab4410a1acd02e0b1d9ca456b1679eba70d1e4 (patch) | |
tree | 9bae2516a6d54f87150a65e0b2926b64f7288386 /sys/ufs | |
parent | 78988cd40a872687a5487a25e0aadefbd9eb2b1b (diff) | |
download | FreeBSD-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
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_dirhash.c | 2 |
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); } |