From 5a3b89a6790c9045306cb4dc5db99e55d3e3b124 Mon Sep 17 00:00:00 2001 From: cunyinch Date: Fri, 24 Feb 2017 15:09:48 +0800 Subject: [PATCH] iscsi: remove the check of task status before transfer datain. The function spdk_iscsi_transfer_in will handle the task if the status is not SPDK_SCSI_STATUS_GOOD. Change-Id: I61155ffa056b3eac551f215d50e1808e5389fdb5 Signed-off-by: cunyinch --- lib/iscsi/iscsi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 5b02cbe60..4795b15ea 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -3106,13 +3106,10 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn, /* transfer data from logical unit */ /* (direction is view of initiator side) */ if (spdk_iscsi_task_is_read(primary)) { - if ((task->scsi.status == SPDK_SCSI_STATUS_GOOD) || - (task->scsi.sense_data_len != 0)) { - rc = spdk_iscsi_transfer_in(conn, task); - if (rc > 0) { - /* sent status by last DATAIN PDU */ - return; - } + rc = spdk_iscsi_transfer_in(conn, task); + if (rc > 0) { + /* sent status by last DATAIN PDU */ + return; } if (primary->scsi.bytes_completed != primary->scsi.transfer_len)