diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-12-12 11:22:47 +0100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-12-19 09:20:06 +0100 |
commit | d0839af9d60a6fdf0720cd0b1a859e0e2241903f (patch) | |
tree | 1cffd4c376b78a76757035e729149db308a99076 | |
parent | 93b3c157b7538e4610361e3d5491e5f762407b6f (diff) | |
download | samba-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.c | 2 |
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; |