nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change

When an NVMe/TCP connection shuts down, the underlying TCP socket can
enter the TCP_CLOSING state (state 11).  Currently, the
nvmet_tcp_state_change() callback does not explicitly handle this state,
which results in harmless but noisy kernel warnings:

nvmet_tcp: queue 2 unhandled state 11

Add TCP_CLOSING to the switch statement alongside TCP_FIN_WAIT2 and
TCP_LAST_ACK to silently ignore the state transition.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
Maurizio Lombardi 2026-03-16 17:44:41 +01:00 committed by Keith Busch
parent 779575bc35
commit 7d953c75f0

View File

@ -1678,6 +1678,7 @@ static void nvmet_tcp_state_change(struct sock *sk)
switch (sk->sk_state) {
case TCP_FIN_WAIT2:
case TCP_LAST_ACK:
case TCP_CLOSING:
break;
case TCP_FIN_WAIT1:
case TCP_CLOSE_WAIT: