diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-09-26 01:12:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:55 -0500 |
commit | be27946d84dbf9155d9505d00abe91089a9b8125 (patch) | |
tree | 90ed05cc9e2f8394822579f2fc9bc0cefa671ba1 /source4/lib/tdb/common/transaction.c | |
parent | 9593101ec118dd242bf25fabf3e17c58269e632c (diff) | |
download | samba-be27946d84dbf9155d9505d00abe91089a9b8125.tar.gz samba-be27946d84dbf9155d9505d00abe91089a9b8125.tar.bz2 samba-be27946d84dbf9155d9505d00abe91089a9b8125.zip |
r10492: work around a bug in solaris which cases lock upgrades to fail with
EDEADLK even when progress can be made. This is not a good solution,
but I can't find anything better.
(This used to be commit 980dd17f7d0a622cd772afc9ba15e50007ad9c6e)
Diffstat (limited to 'source4/lib/tdb/common/transaction.c')
-rw-r--r-- | source4/lib/tdb/common/transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/tdb/common/transaction.c b/source4/lib/tdb/common/transaction.c index cf0f378dce..9d37046116 100644 --- a/source4/lib/tdb/common/transaction.c +++ b/source4/lib/tdb/common/transaction.c @@ -772,7 +772,7 @@ int tdb_transaction_commit(struct tdb_context *tdb) } /* upgrade the main transaction lock region to a write lock */ - if (tdb_brlock_len(tdb, FREELIST_TOP, F_WRLCK, F_SETLKW, 0, 0) == -1) { + if (tdb_brlock_upgrade(tdb, FREELIST_TOP, 0) == -1) { TDB_LOG((tdb, 0, "tdb_transaction_start: failed to upgrade hash locks\n")); tdb->ecode = TDB_ERR_LOCK; tdb_transaction_cancel(tdb); |