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>
*/
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);