dlm: fix no ack after final message
authorAlexander Aring <aahringo@redhat.com>
Tue, 10 Oct 2023 22:04:47 +0000 (18:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:21 +0000 (11:59 +0100)
commit9541151509865ecc39ecfd7a52203d6e6805f306
tree154e11a48806a053eb293b98401bc3749984158a
parentfd508e08ef54fc46c79e6f18dcbc352e38d07a6a
dlm: fix no ack after final message

[ Upstream commit 6212e4528b248a4bc9b4fe68e029a84689c67461 ]

In case of an final DLM message we can't should not send an ack out
after the final message. This patch moves the ack message before the
messages will be transmitted. If it's the final message and the
receiving node turns into DLM_CLOSED state another ack messages will
being received and turning the receiving node into DLM_ESTABLISHED
again.

Fixes: 1696c75f1864 ("fs: dlm: add send ack threshold and append acks to msgs")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dlm/midcomms.c