summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-03 20:33:25 +0000
committerJeremy Allison <jra@samba.org>2000-05-03 20:33:25 +0000
commit8c19fa8f7abaf97a994e733394ad3631a31dca40 (patch)
treef90c77332248b8c8d86273941f5d813352d7034e /source3
parent756798d00050eea4468c2d8bb0c3b98390c0e8eb (diff)
downloadsamba-8c19fa8f7abaf97a994e733394ad3631a31dca40.tar.gz
samba-8c19fa8f7abaf97a994e733394ad3631a31dca40.tar.bz2
samba-8c19fa8f7abaf97a994e733394ad3631a31dca40.zip
Fix based on Elrond's code to reduce the store size on removing dead records.
Jeremy. (This used to be commit 09e92a61a966d09f543ba541ddb3240cc4718579)
Diffstat (limited to 'source3')
-rw-r--r--source3/locking/brlock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index c590c51272..51f3175dbf 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -126,6 +126,7 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat
if (count == 0) {
tdb_delete(tdb, kbuf);
} else if (count < (dbuf.dsize / sizeof(*locks))) {
+ dbuf.dsize = count * sizeof(*locks);
tdb_store(tdb, kbuf, dbuf, TDB_REPLACE);
}