iscsit_close_connection() calls isert_wait_conn(). Due to commit e9d3009cb936 both functions call target_wait_for_sess_cmds() although that last function should be called only once. Fix this by removing the target_wait_for_sess_cmds() call from isert_wait_conn() and by only calling isert_wait_conn() after target_wait_for_sess_cmds().
Unified · Split
| @@ -2575,17 +2575,6 @@ isert_wait4logout(struct isert_conn *isert_conn) · 2574 unmodified lines | |||
| 2575 | } | 2575 | } |
| 2576 | } | 2576 | } |
| 2577 | 2577 | ||
| 2578 | static void | ||
| 2579 | isert_wait4cmds(struct iscsi_conn *conn) | ||
| 2580 | { | ||
| 2581 | isert_info("iscsi_conn %p\n", conn); | ||
| 2582 | |||
| 2583 | if (conn->sess) { | ||
| 2584 | target_sess_cmd_list_set_waiting(conn->sess->se_sess); | ||
| 2585 | target_wait_for_sess_cmds(conn->sess->se_sess); | ||
| 2586 | } | ||
| 2587 | } | ||
| 2588 | |||
| 2589 | /** | 2578 | /** |
| 2590 | * isert_put_unsol_pending_cmds() - Drop commands waiting for | 2579 | * isert_put_unsol_pending_cmds() - Drop commands waiting for |
| 2591 | * unsolicitate dataout | 2580 | * unsolicitate dataout |
| @@ -2633,7 +2622,6 @@ static void isert_wait_conn(struct iscsi_conn *conn) · 41 unmodified lines | |||
| 2633 | 2622 | ||
| 2634 | ib_drain_qp(isert_conn->qp); | 2623 | ib_drain_qp(isert_conn->qp); |
| 2635 | isert_put_unsol_pending_cmds(conn); | 2624 | isert_put_unsol_pending_cmds(conn); |
| 2636 | isert_wait4cmds(conn); | ||
| 2637 | isert_wait4logout(isert_conn); | 2625 | isert_wait4logout(isert_conn); |
| 2638 | 2626 | ||
| 2639 | queue_work(isert_release_wq, &isert_conn->release_work); | 2627 | queue_work(isert_release_wq, &isert_conn->release_work); |
| @@ -4149,9 +4149,6 @@ int iscsit_close_connection( · 4148 unmodified lines | |||
| 4149 | iscsit_stop_nopin_response_timer(conn); | 4149 | iscsit_stop_nopin_response_timer(conn); |
| 4150 | iscsit_stop_nopin_timer(conn); | 4150 | iscsit_stop_nopin_timer(conn); |
| 4151 | 4151 | ||
| 4152 | if (conn->conn_transport->iscsit_wait_conn) | ||
| 4153 | conn->conn_transport->iscsit_wait_conn(conn); | ||
| 4154 | |||
| 4155 | /* | 4152 | /* |
| 4156 | * During Connection recovery drop unacknowledged out of order | 4153 | * During Connection recovery drop unacknowledged out of order |
| 4157 | * commands for this connection, and prepare the other commands | 4154 | * commands for this connection, and prepare the other commands |
| @@ -4237,6 +4234,9 @@ int iscsit_close_connection( · 79 unmodified lines | |||
| 4237 | target_sess_cmd_list_set_waiting(sess->se_sess); | 4234 | target_sess_cmd_list_set_waiting(sess->se_sess); |
| 4238 | target_wait_for_sess_cmds(sess->se_sess); | 4235 | target_wait_for_sess_cmds(sess->se_sess); |
| 4239 | 4236 | ||
| 4237 | if (conn->conn_transport->iscsit_wait_conn) | ||
| 4238 | conn->conn_transport->iscsit_wait_conn(conn); | ||
| 4239 | |||
| 4240 | ahash_request_free(conn->conn_tx_hash); | 4240 | ahash_request_free(conn->conn_tx_hash); |
| 4241 | if (conn->conn_rx_hash) { | 4241 | if (conn->conn_rx_hash) { |
| 4242 | struct crypto_ahash *tfm; | 4242 | struct crypto_ahash *tfm; |