aboutsummaryrefslogtreecommitdiffstats
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:13:12 +0200
commitda9bb48a459644801deac2514fc00c9c639c2ef5 (patch)
treea215fcc8f2d2b1000c09f3fb529b79f7cc2f5dad
parent72a8c69935a7a5380689abd9a98df81291f6c812 (diff)
downloadsamba-da9bb48a459644801deac2514fc00c9c639c2ef5.tar.gz
samba-da9bb48a459644801deac2514fc00c9c639c2ef5.tar.xz
samba-da9bb48a459644801deac2514fc00c9c639c2ef5.zip
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)
-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 3df319bb022..33df06f2720 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -974,10 +974,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)