From 4400805208722e3679809a0ca53c2285e45212ca Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 31 Oct 1997 05:56:07 +0000 Subject: 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) --- source3/locking/locking_shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/locking') diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c index c1e32538e1..dfabbac290 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()) /******************************************************************* -- cgit