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

ctdb-recoverd: Return early when the recovery lock is not held

This makes upcoming changes simpler.

Update to modern debug macro while touching relevant line.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-09-11 15:05:19 +10:00 committed by Martin Schwenke
parent c52216740b
commit a755d060c1

View File

@ -976,10 +976,12 @@ static bool ctdb_recovery_lock(struct ctdb_recoverd *rec)
static void ctdb_recovery_unlock(struct ctdb_recoverd *rec)
{
if (rec->recovery_lock_handle != NULL) {
DEBUG(DEBUG_NOTICE, ("Releasing recovery lock\n"));
TALLOC_FREE(rec->recovery_lock_handle);
if (rec->recovery_lock_handle == NULL) {
return;
}
D_NOTICE("Releasing recovery lock\n");
TALLOC_FREE(rec->recovery_lock_handle);
}
static void ban_misbehaving_nodes(struct ctdb_recoverd *rec, bool *self_ban)