summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-28 14:40:31 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-28 14:40:31 +0000
commit9f0be847fdbcf0f8bbd69de6cdf277ae0440bcda (patch)
tree1a63931faf964771ddd4793720dba490f06c0cbc
parent6388da22eb95c8bfd3f17f5645bdaa16cfca0c6b (diff)
downloadsamba-9f0be847fdbcf0f8bbd69de6cdf277ae0440bcda.tar.gz
lower the default hash size if SEMMSL isn't defined
-rw-r--r--source/include/smb.h5
-rw-r--r--source/locking/locking_shm.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/source/include/smb.h b/source/include/smb.h
index d7a576de857..cdd7bcac7ad 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -49,7 +49,7 @@
#ifdef SEMMSL
#define SHMEM_HASH_SIZE (SEMMSL-1)
#else
-#define SHMEM_HASH_SIZE 113
+#define SHMEM_HASH_SIZE 15
#endif
#endif
@@ -1312,9 +1312,6 @@ typedef struct
} share_mode_entry;
-/* Conversion to hash entry index from device and inode numbers. */
-#define HASH_ENTRY(dev,ino) ((( (uint32)(dev) )* ( (uint32)(ino) )) % lp_shmem_hash_size())
-
/* each implementation of the share mode code needs
to support the following operations */
struct share_ops {
diff --git a/source/locking/locking_shm.c b/source/locking/locking_shm.c
index f2ae6418086..3abd6b25a70 100644
--- a/source/locking/locking_shm.c
+++ b/source/locking/locking_shm.c
@@ -62,6 +62,11 @@ typedef struct
static int read_only;
+
+/* Conversion to hash entry index from device and inode numbers. */
+#define HASH_ENTRY(dev,ino) ((( (uint32)(dev) )* ( (uint32)(ino) )) % lp_shmem_hash_size())
+
+
/*******************************************************************
deinitialize the shared memory for share_mode management
******************************************************************/