1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

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
This commit is contained in:
Volker Lendecke 2010-02-16 12:31:58 +01:00
parent be919d6fae
commit 83542d973c

View File

@ -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;
}