diff options
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 0769e9482194..f12d605c7729 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -1237,8 +1237,9 @@ iscsi_tcp_state_change(struct sock *sk) | |||
1237 | conn = (struct iscsi_conn*)sk->sk_user_data; | 1237 | conn = (struct iscsi_conn*)sk->sk_user_data; |
1238 | session = conn->session; | 1238 | session = conn->session; |
1239 | 1239 | ||
1240 | if (sk->sk_state == TCP_CLOSE_WAIT || | 1240 | if ((sk->sk_state == TCP_CLOSE_WAIT || |
1241 | sk->sk_state == TCP_CLOSE) { | 1241 | sk->sk_state == TCP_CLOSE) && |
1242 | !atomic_read(&sk->sk_rmem_alloc)) { | ||
1242 | debug_tcp("iscsi_tcp_state_change: TCP_CLOSE|TCP_CLOSE_WAIT\n"); | 1243 | debug_tcp("iscsi_tcp_state_change: TCP_CLOSE|TCP_CLOSE_WAIT\n"); |
1243 | iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); | 1244 | iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); |
1244 | } | 1245 | } |