Browse Source

IB/iser: Terminate connection before cleaning inflight tasks

When closing the connection, we should first terminate the connection
(in case it was not previously terminated) to guarantee the QP is in
error state and we are done with servicing IO. Only then go ahead with
tasks cleanup via iscsi_conn_stop.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Sagi Grimberg 10 years ago
parent
commit
f0caef6d40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/infiniband/ulp/iser/iscsi_iser.c

+ 1 - 1
drivers/infiniband/ulp/iser/iscsi_iser.c

@@ -541,8 +541,8 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
 	 */
 	 */
 	if (iser_conn) {
 	if (iser_conn) {
 		mutex_lock(&iser_conn->state_mutex);
 		mutex_lock(&iser_conn->state_mutex);
-		iscsi_conn_stop(cls_conn, flag);
 		iser_conn_terminate(iser_conn);
 		iser_conn_terminate(iser_conn);
+		iscsi_conn_stop(cls_conn, flag);
 
 
 		/* unbind */
 		/* unbind */
 		iser_conn->iscsi_conn = NULL;
 		iser_conn->iscsi_conn = NULL;