ctdb-recoverd: Handle cancellation when releasing recovery lock
commitb1dc5687844e90b0e3c39cb46a1116c86118fbf4
authorMartin Schwenke <martin@meltin.net>
Mon, 3 Sep 2018 03:01:19 +0000 (3 13:01 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 17 Sep 2018 20:58:20 +0000 (17 22:58 +0200)
tree8840f3a4ca94dc415efc26725a3e9bf8137a2068
parenta755d060c13b65dfb6d73979aaf111c489882bfb
ctdb-recoverd: Handle cancellation when releasing recovery lock

If the recovery lock is in the process of being taken then free the
cluster mutex handle but leave the recovery lock handle in place.
This allows ctdb_recovery_lock() to fail.

Note that this isn't yet live because rec->recovery_lock_handle is
still only set at the completion of the attempt to take the lock.

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>
ctdb/server/ctdb_recoverd.c