The next commit will change the handling of dead records, removing the
"tdb_do_delete" function. As traverses should not happen in normal
operations, dead records from them should be rare, and relying on
traverses to remove them is a very bad idea IMHO.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
/* Iterate through chain */
while( tlock->off) {
- tdb_off_t current;
if (tdb_rec_read(tdb, tlock->off, rec) == -1)
goto fail;
return tlock->off;
}
- /* Try to clean dead ones from old traverses */
- current = tlock->off;
tlock->off = rec->next;
- if (!(tdb->read_only || tdb->traverse_read) &&
- tdb_do_delete(tdb, current, rec) != 0)
- goto fail;
}
tdb_unlock(tdb, tlock->list, tlock->lock_rw);
want_next = 0;