]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-recoverd: Return early when the recovery lock is not held
authorMartin Schwenke <martin@meltin.net>
Tue, 11 Sep 2018 05:05:19 +0000 (15:05 +1000)
committerKarolin Seeger <kseeger@samba.org>
Thu, 20 Sep 2018 07:13:12 +0000 (09:13 +0200)
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)

ctdb/server/ctdb_recoverd.c

index 3df319bb02242b176c8f1dd74da42ad6b4042a90..33df06f2720e22b743c3a5476649a5861e7be389 100644 (file)
@@ -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)