fs: dlm: be sure to call dlm_send_queue_flush()
authorAlexander Aring <aahringo@redhat.com>
Thu, 12 Jan 2023 22:10:33 +0000 (17:10 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 23 Jan 2023 18:57:18 +0000 (12:57 -0600)
If we release a midcomms node structure, there should be nothing left
inside the dlm midcomms send queue. However, sometimes this is not true
because I believe some DLM_FIN message was not acked... if we run
into a shutdown timeout, then we should be sure there is no pending send
dlm message inside this queue when releasing midcomms node structure.

Cc: stable@vger.kernel.org
Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/midcomms.c

index 2e60d9a2c8832240aa15873224ad95223018a66f..a3eb19c8cec53abd5ec291d300ad8ef10f8f07a7 100644 (file)
@@ -1402,6 +1402,7 @@ static void midcomms_node_release(struct rcu_head *rcu)
        struct midcomms_node *node = container_of(rcu, struct midcomms_node, rcu);
 
        WARN_ON_ONCE(atomic_read(&node->send_queue_cnt));
+       dlm_send_queue_flush(node);
        kfree(node);
 }