diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index d6424cfd81..b668e0be77 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -416,7 +416,6 @@ spdk_iscsi_conn_free_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pd conn->data_in_cnt--; spdk_iscsi_task_put(spdk_iscsi_task_get_primary(pdu->task)); } - spdk_iscsi_conn_handle_queued_tasks(conn); } } else if (pdu->bhs.opcode == ISCSI_OP_SCSI_RSP && pdu->task->scsi.status != SPDK_SCSI_STATUS_GOOD) { @@ -1261,6 +1260,8 @@ spdk_iscsi_conn_execute(struct spdk_iscsi_conn *conn) } } + spdk_iscsi_conn_handle_queued_tasks(conn); + if (conn_active) { return 1; } diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 0b09e01046..42b388a80e 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -2722,12 +2722,10 @@ spdk_iscsi_transfer_in(struct spdk_iscsi_conn *conn, if (task->scsi.status != SPDK_SCSI_STATUS_GOOD) { if (task != primary) { conn->data_in_cnt--; - spdk_iscsi_conn_handle_queued_tasks(conn); } else { /* handle the case that it is a primary task which has subtasks */ if (primary->scsi.transfer_len != task->scsi.length) { conn->data_in_cnt--; - spdk_iscsi_conn_handle_queued_tasks(conn); } }