diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2010-02-22 13:58:07 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-02-22 13:58:07 +1030 |
commit | 9136818df30c7179e1cffa18201cdfc990ebd7b7 (patch) | |
tree | e52bacd6be1238bdf194f7db72824227aca79593 /lib/tdb/common/lock.c | |
parent | e8fa70a321d489b454b07bd65e9b0d95084168de (diff) | |
download | samba-9136818df30c7179e1cffa18201cdfc990ebd7b7.tar.gz samba-9136818df30c7179e1cffa18201cdfc990ebd7b7.tar.bz2 samba-9136818df30c7179e1cffa18201cdfc990ebd7b7.zip |
tdb: use tdb_nest_lock() for open lock.
This never nests, so it's overkill, but it centralizes the locking into
lock.c and removes the ugly flag in the transaction code to track whether
we have the lock or not.
Note that we have a temporary hack so this places a real lock, despite
the fact that we are in a transaction.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/common/lock.c')
-rw-r--r-- | lib/tdb/common/lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c index 870601126b..6f5799a819 100644 --- a/lib/tdb/common/lock.c +++ b/lib/tdb/common/lock.c @@ -683,7 +683,8 @@ bool tdb_have_extra_locks(struct tdb_context *tdb) return extra; } -/* The transaction code uses this to remove all locks. */ +/* The transaction code uses this to remove all locks. Note that this + may include OPEN_LOCK. */ void tdb_release_extra_locks(struct tdb_context *tdb) { unsigned int i, extra = 0; |