Commit 788b71c5 authored by Mike Christie's avatar Mike Christie Committed by Martin K. Petersen

scsi: iscsi: iscsi_tcp: Start socket shutdown during conn stop

Make sure the conn socket shutdown starts before we start the timer to fail
commands to upper layers.

Link: https://lore.kernel.org/r/20210525181821.7617-10-michael.christie@oracle.comReviewed-by: default avatarLee Duncan <lduncan@suse.com>
Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c0920cd3
......@@ -600,6 +600,12 @@ static void iscsi_sw_tcp_release_conn(struct iscsi_conn *conn)
if (!sock)
return;
/*
* Make sure we start socket shutdown now in case userspace is up
* but delayed in releasing the socket.
*/
kernel_sock_shutdown(sock, SHUT_RDWR);
sock_hold(sock->sk);
iscsi_sw_tcp_conn_restore_callbacks(conn);
sock_put(sock->sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment