mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
8fb0d51534
commit
da126abaf1
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue