fs: dlm: send FIN ack back in right cases
authorAlexander Aring <aahringo@redhat.com>
Thu, 12 Jan 2023 22:10:37 +0000 (17:10 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 23 Jan 2023 20:30:07 +0000 (14:30 -0600)
commit00908b3388255fc1d3782b744d07f327712f401f
tree0766c957e81f6dea5a0d47c38736f9a687d26b5a
parenta58496361802070996f9bd76e941d109c4a85ebd
fs: dlm: send FIN ack back in right cases

This patch moves to send a ack back for receiving a FIN message only
when we are in valid states. In other cases and there might be a sender
waiting for a ack we just let it timeout at the senders time and
hopefully all other cleanups will remove the FIN message on their
sending queue. As an example we should never send out an ACK being in
LAST_ACK state or we cannot assume a working socket communication when
we are in CLOSED 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>
fs/dlm/midcomms.c