1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:g_lock: remove redundant code in g_lock_trylock()

g_lock_cleanup_shared() handles lck.num_shared == 0 just fine...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2022-08-28 11:58:14 +02:00 committed by Jeremy Allison
parent d19fa657d7
commit 7cac6eb5d8

View File

@ -861,16 +861,6 @@ do_shared:
*/
dbwrap_watched_watch_remove_instance(rec, state->watch_instance);
if (lck.num_shared == 0) {
status = g_lock_store(rec, &lck, &self, NULL, 0);
if (!NT_STATUS_IS_OK(status)) {
DBG_DEBUG("g_lock_store() failed: %s\n",
nt_errstr(status));
}
return status;
}
g_lock_cleanup_shared(&lck);
status = g_lock_store(rec, &lck, &self, NULL, 0);