ctdb-locking: Set destructor when lock_context is created
commit5ae6a8f2fff5b5f4d46f496fd83f555be4b3d448
authorAmitay Isaacs <amitay@gmail.com>
Mon, 1 Jun 2015 14:22:07 +0000 (2 00:22 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 12 Jun 2015 10:40:54 +0000 (12 12:40 +0200)
treeb559d07f1f99df4f6fc045b153332e0f6f75e224
parent752ec31bcbbfe9f5b3b1c5dde4179d69f41cb53c
ctdb-locking: Set destructor when lock_context is created

There is already code in the destructor to correctly remove it from the
pending or the active queue.  This also ensures that when lock context
is in pending queue and if the lock request gets freed, the lock context
is correctly removed from the pending queue.

Thanks to Stefan Metzmacher for noticing this and suggesting the fix.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb/server/ctdb_lock.c