summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2018-09-11 15:05:19 +1000
committerKarolin Seeger <kseeger@samba.org>2018-09-20 09:11:20 +0200
commita9c7c64116ad0031aa132bceee08cec9adc37ad8 (patch)
tree70642d5128200df8d7690a3884eb3015897f23b1 /ctdb
parent491304027110a89a14415cfab62dc50d38b9131d (diff)
downloadsamba-a9c7c64116ad0031aa132bceee08cec9adc37ad8.tar.gz
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> (cherry picked from commit a755d060c13b65dfb6d73979aaf111c489882bfb)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_recoverd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 46357b6ed69..6a021101535 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -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)