diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-31 05:56:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-31 05:56:07 +0000 |
commit | 4400805208722e3679809a0ca53c2285e45212ca (patch) | |
tree | de7661beaaa201fb90f0bdb83cc197193be610a7 /source3/locking | |
parent | 88bd62c9b0c6d7fea06207a1ec160684e8aa0f51 (diff) | |
download | samba-4400805208722e3679809a0ca53c2285e45212ca.tar.gz samba-4400805208722e3679809a0ca53c2285e45212ca.tar.xz samba-4400805208722e3679809a0ca53c2285e45212ca.zip |
change from * to ^ in hashing of device/inode. Using * meant that if
the device number happened to divide the number of hash buckets we
would only use a small fraction of the hash buckets, which would slow
things down.
(This used to be commit 623ffd701f2f966875d396d8b2df74f0cf874cda)
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/locking_shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c index c1e32538e1e..dfabbac2901 100644 --- a/source3/locking/locking_shm.c +++ b/source3/locking/locking_shm.c @@ -64,7 +64,7 @@ static int read_only; /* Conversion to hash entry index from device and inode numbers. */ -#define HASH_ENTRY(dev,ino) ((((uint32)(dev)) * ((uint32)(ino))) % shmops->hash_size()) +#define HASH_ENTRY(dev,ino) ((((uint32)(dev)) ^ ((uint32)(ino))) % shmops->hash_size()) /******************************************************************* |