The branch, master has been updated via 760104188d0d2ed96ec4a70138e6d0bf86d797ed (commit) from 8e04c69e027260e7e1f0a4cf3e58e31ed4084d8b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 760104188d0d2ed96ec4a70138e6d0bf86d797ed Author: Rusty Russell <ru...@rustcorp.com.au> Date: Tue Jul 21 16:23:35 2009 +0930 tdb: fix locking error 54a51839ea65aa788b18fce8de0ae4f9ba63e4e7 "Make tdb transaction lock recursive (samba version)" was broken: I "cleaned it up" and prevented it from ever unlocking. To see the problem: $ bin/tdbtorture -s 1248142523 tdb_brlock failed (fd=3) at offset 8 rw_type=1 lck_type=14 len=1 tdb_transaction_lock: failed to get transaction lock tdb_transaction_start failed: Resource deadlock avoided My testcase relied on the *count* being correct, which it was. Fixing that now. Signed-off-by: Rusty Russell <ru...@rustcorp.com.au> Signed-off-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/tdb/common/lock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c index d812fbf..2c72ae1 100644 --- a/lib/tdb/common/lock.c +++ b/lib/tdb/common/lock.c @@ -328,7 +328,7 @@ int tdb_transaction_unlock(struct tdb_context *tdb) if (tdb->global_lock.count) { return 0; } - if (tdb->transaction_lock_count > 0) { + if (tdb->transaction_lock_count > 1) { tdb->transaction_lock_count--; return 0; } -- Samba Shared Repository