From 771d8f27940b5e8131a05afcca98c5de3445f4ed Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Thu, 12 Jan 2023 17:10:33 -0500 Subject: [PATCH] fs: dlm: be sure to call dlm_send_queue_flush() [ Upstream commit 557856c7140be71b8c765934d7db78996890b893 ] 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: 9c99c76781ff ("fs: dlm: add reliable connection if reconnect") Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Sasha Levin --- fs/dlm/midcomms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c index b53d7a281be93..d976c2009b185 100644 --- a/fs/dlm/midcomms.c +++ b/fs/dlm/midcomms.c @@ -1367,6 +1367,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); } -- 2.39.5