summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-12-12 11:22:47 +0100
committerAmitay Isaacs <amitay@samba.org>2014-12-19 09:20:06 +0100
commitd0839af9d60a6fdf0720cd0b1a859e0e2241903f (patch)
tree1cffd4c376b78a76757035e729149db308a99076
parent93b3c157b7538e4610361e3d5491e5f762407b6f (diff)
downloadsamba-d0839af9d60a6fdf0720cd0b1a859e0e2241903f.tar.gz
tdb: allow transactions on on tdb's with TDB_MUTEX_LOCKING
There's no real reason to disallow transactions as the allrecord lock is also available with mutexes enabled. E.g. ctdbd requires transactions also on non-persistent databases opened with TDB_CLEAR_IF_FIRST and TDB_MUTEX_LOCKING. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11004 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r--lib/tdb/common/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index caef0bedd82..0dd057ba7a7 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -421,7 +421,7 @@ static int _tdb_transaction_start(struct tdb_context *tdb,
enum tdb_lock_flags lockflags)
{
/* some sanity checks */
- if (tdb->read_only || (tdb->flags & (TDB_INTERNAL|TDB_MUTEX_LOCKING))
+ if (tdb->read_only || (tdb->flags & TDB_INTERNAL)
|| tdb->traverse_read) {
TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: cannot start a transaction on a read-only or internal db\n"));
tdb->ecode = TDB_ERR_EINVAL;