diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-09 23:00:48 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-13 22:58:41 +0100 |
commit | 5b6520044b7026baf1cff554b400f7ff1f024d77 (patch) | |
tree | 64dde1590543520ff33a7a47c00f5facbfd2454b /source3 | |
parent | 58d2f1ff81ce6af8337824427a88f6d035488edb (diff) | |
download | samba-5b6520044b7026baf1cff554b400f7ff1f024d77.tar.gz samba-5b6520044b7026baf1cff554b400f7ff1f024d77.tar.bz2 samba-5b6520044b7026baf1cff554b400f7ff1f024d77.zip |
Fix the max_dead_record calculations
(This used to be commit 4aaf4e7e73a5c7fa97ef730fbff5c7cb12df2d6c)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/tdb/common/open.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/tdb/common/open.c b/source3/lib/tdb/common/open.c index 6bd8fda2bf..94140a4baa 100644 --- a/source3/lib/tdb/common/open.c +++ b/source3/lib/tdb/common/open.c @@ -179,9 +179,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, tdb->page_size = 0x2000; } - if (open_flags & TDB_VOLATILE) { - tdb->max_dead_records = 5; - } + tdb->max_dead_records = (open_flags & TDB_VOLATILE) ? 5 : 0; if ((open_flags & O_ACCMODE) == O_WRONLY) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n", @@ -288,7 +286,6 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, tdb->map_size = st.st_size; tdb->device = st.st_dev; tdb->inode = st.st_ino; - tdb->max_dead_records = 0; tdb_mmap(tdb); if (locked) { if (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK, 0, 1) == -1) { |