1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Fix the max_dead_record calculations

This commit is contained in:
Volker Lendecke 2008-01-09 23:00:48 +01:00
parent 829de79051
commit 2a5c53220a

View File

@ -178,9 +178,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",
@ -283,7 +281,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) {