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 <cunyin.chang@intel.com>
This commit is contained in:
cunyinch 2017-02-24 15:09:48 +08:00 committed by Daniel Verkamp
parent 687e93c4a5
commit 5a3b89a679

View File

@ -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)