fs: dlm: move sending fin message into state change handling
authorAlexander Aring <aahringo@redhat.com>
Thu, 12 Jan 2023 22:10:36 +0000 (17:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:08 +0000 (09:34 +0100)
commite3df326f8cc2335358c16e95ad9ef78fa431470b
treebe11f2015bcf5a2c130fde58d7cad1434442ba35
parent83c8cb2ba0adc8079148db3e43b99fcd50beb214
fs: dlm: move sending fin message into state change handling

commit a58496361802070996f9bd76e941d109c4a85ebd upstream.

This patch moves the send fin handling, which should appear in a specific
state change, into the state change handling while the per node
state_lock is held. I experienced issues with other messages because
we changed the state and a fin message was sent out in a different state.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/dlm/midcomms.c