Skip to content

Commit 478814a

Browse files
maurizio-lombardiChristoph Hellwig
authored andcommitted
nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change()
TCP_FIN_WAIT2 and TCP_LAST_ACK were not handled, the connection is closing so we can ignore them and avoid printing the "unhandled state" warning message. [ 1298.852386] nvmet_tcp: queue 2 unhandled state 5 [ 1298.879112] nvmet_tcp: queue 7 unhandled state 5 [ 1298.884253] nvmet_tcp: queue 8 unhandled state 5 [ 1298.889475] nvmet_tcp: queue 9 unhandled state 5 v2: Do not call nvmet_tcp_schedule_release_queue(), just ignore the fin_wait2 and last_ack states. Signed-off-by: Maurizio Lombardi <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent da0342a commit 478814a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/nvme/target/tcp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,9 @@ static void nvmet_tcp_state_change(struct sock *sk)
15061506
goto done;
15071507

15081508
switch (sk->sk_state) {
1509+
case TCP_FIN_WAIT2:
1510+
case TCP_LAST_ACK:
1511+
break;
15091512
case TCP_FIN_WAIT1:
15101513
case TCP_CLOSE_WAIT:
15111514
case TCP_CLOSE:

0 commit comments

Comments
 (0)