summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-02-16 12:31:58 +0100
committerVolker Lendecke <vl@samba.org>2010-02-16 13:21:10 +0100
commit83542d973ca771353109c7da4b0391d6ba910f53 (patch)
tree63f94ce267c659b6228043e2cc324f4b667e15ff /source3/lib
parentbe919d6faed198cdc29322a4d9491946c0b044b3 (diff)
downloadsamba-83542d973ca771353109c7da4b0391d6ba910f53.tar.gz
samba-83542d973ca771353109c7da4b0391d6ba910f53.tar.bz2
samba-83542d973ca771353109c7da4b0391d6ba910f53.zip
s3: Slightly increase parallelism in g_lock
There's no need to still hold the g_lock tdb-level lock while telling the waiters to retry
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/g_lock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index 33ebe94803..add670c154 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -527,6 +527,8 @@ static NTSTATUS g_lock_force_unlock(struct g_lock_ctx *ctx, const char *name,
goto done;
}
+ TALLOC_FREE(rec);
+
if ((lock_type & G_LOCK_PENDING) == 0) {
int num_wakeups = 0;
@@ -566,9 +568,13 @@ static NTSTATUS g_lock_force_unlock(struct g_lock_ctx *ctx, const char *name,
}
}
done:
+ /*
+ * For the error path, TALLOC_FREE(rec) as well. In the good
+ * path we have already freed it.
+ */
+ TALLOC_FREE(rec);
TALLOC_FREE(locks);
- TALLOC_FREE(rec);
return status;
}