diff options
author | Volker Lendecke <vl@samba.org> | 2008-08-12 22:31:52 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-14 19:19:45 +0200 |
commit | 8c88209c6f4b57b0dbe1459bd5bc583c5d321758 (patch) | |
tree | fe8def45bb7fad0e8347bf55b3e297ae8a0b6b82 /source4/lib | |
parent | 9d6e473c22baba10e8ad5f9423c6798e1d070d23 (diff) | |
download | samba-8c88209c6f4b57b0dbe1459bd5bc583c5d321758.tar.gz samba-8c88209c6f4b57b0dbe1459bd5bc583c5d321758.tar.bz2 samba-8c88209c6f4b57b0dbe1459bd5bc583c5d321758.zip |
Attempt to fix bug 5684
With the ctdb checkin dde9f3f006 tdb optimized out write lock checks for
write-enabled transaction. Sadly, this also removed the possibility to ever
remove dead records left over from tdb_delete calls within a transaction.
Tridge, please check this! Did dde9f3f006 have any reason beyond performance
optimizations?
Thanks,
Volker
(cherry picked from commit 3f884c4ae36f3260e63626bdd4989d9258ae6497)
(This used to be commit 1d85e0647e287d269b3f6b534da88f497d6f76c3)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/tdb/common/tdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c index 767452c9b3..c7cec297f6 100644 --- a/source4/lib/tdb/common/tdb.c +++ b/source4/lib/tdb/common/tdb.c @@ -243,7 +243,7 @@ int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct if (tdb->read_only || tdb->traverse_read) return -1; - if (tdb->traverse_write != 0 || + if (((tdb->traverse_write != 0) && (!TDB_DEAD(rec))) || tdb_write_lock_record(tdb, rec_ptr) == -1) { /* Someone traversing here: mark it as dead */ rec->magic = TDB_DEAD_MAGIC; |