summary refs log tree commit diff
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2023-01-12 17:10:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-17 08:50:19 +0100
commit3c1bc8ded4e4834ab03972dfb936e1ebac1ed9f8 (patch)
tree0850f2f3fd592356c02a21c96761f88393ec7dd0 /fs/dlm
parent29682b8a3dbae70392ef4dbb8d34703596409c9b (diff)
downloadlinux-3c1bc8ded4e4834ab03972dfb936e1ebac1ed9f8.tar.gz
fs: dlm: be sure to call dlm_send_queue_flush()
[ Upstream commit 7354fa4ef697191effedc2ae9a8293427708bbf5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/midcomms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c
index b53d7a281be9..d976c2009b18 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);
 }