diff options
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_initiator.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_initiator.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 35af60a23c6..c3608392213 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c | |||
@@ -558,7 +558,12 @@ void iser_rcv_completion(struct iser_desc *rx_desc, | |||
558 | opcode = hdr->opcode & ISCSI_OPCODE_MASK; | 558 | opcode = hdr->opcode & ISCSI_OPCODE_MASK; |
559 | 559 | ||
560 | if (opcode == ISCSI_OP_SCSI_CMD_RSP) { | 560 | if (opcode == ISCSI_OP_SCSI_CMD_RSP) { |
561 | spin_lock(&conn->iscsi_conn->session->lock); | ||
561 | task = iscsi_itt_to_ctask(conn->iscsi_conn, hdr->itt); | 562 | task = iscsi_itt_to_ctask(conn->iscsi_conn, hdr->itt); |
563 | if (task) | ||
564 | __iscsi_get_task(task); | ||
565 | spin_unlock(&conn->iscsi_conn->session->lock); | ||
566 | |||
562 | if (!task) | 567 | if (!task) |
563 | iser_err("itt can't be matched to task!!! " | 568 | iser_err("itt can't be matched to task!!! " |
564 | "conn %p opcode %d itt %d\n", | 569 | "conn %p opcode %d itt %d\n", |
@@ -568,6 +573,7 @@ void iser_rcv_completion(struct iser_desc *rx_desc, | |||
568 | iser_dbg("itt %d task %p\n",hdr->itt, task); | 573 | iser_dbg("itt %d task %p\n",hdr->itt, task); |
569 | iser_task->status = ISER_TASK_STATUS_COMPLETED; | 574 | iser_task->status = ISER_TASK_STATUS_COMPLETED; |
570 | iser_task_rdma_finalize(iser_task); | 575 | iser_task_rdma_finalize(iser_task); |
576 | iscsi_put_task(task); | ||
571 | } | 577 | } |
572 | } | 578 | } |
573 | iser_dto_buffs_release(dto); | 579 | iser_dto_buffs_release(dto); |