aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r--drivers/scsi/iscsi_tcp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 517da3fd89d3..8a89ba900588 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -584,9 +584,10 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
584 struct iscsi_conn *conn = cls_conn->dd_data; 584 struct iscsi_conn *conn = cls_conn->dd_data;
585 struct iscsi_tcp_conn *tcp_conn = conn->dd_data; 585 struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
586 struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data; 586 struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data;
587 struct socket *sock = tcp_sw_conn->sock;
587 588
588 /* userspace may have goofed up and not bound us */ 589 /* userspace may have goofed up and not bound us */
589 if (!tcp_sw_conn->sock) 590 if (!sock)
590 return; 591 return;
591 /* 592 /*
592 * Make sure our recv side is stopped. 593 * Make sure our recv side is stopped.
@@ -597,6 +598,11 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
597 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); 598 set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
598 write_unlock_bh(&tcp_sw_conn->sock->sk->sk_callback_lock); 599 write_unlock_bh(&tcp_sw_conn->sock->sk->sk_callback_lock);
599 600
601 if (sock->sk->sk_sleep && waitqueue_active(sock->sk->sk_sleep)) {
602 sock->sk->sk_err = EIO;
603 wake_up_interruptible(sock->sk->sk_sleep);
604 }
605
600 iscsi_conn_stop(cls_conn, flag); 606 iscsi_conn_stop(cls_conn, flag);
601 iscsi_sw_tcp_release_conn(conn); 607 iscsi_sw_tcp_release_conn(conn);
602} 608}