iscsi: Remove duplicated check of scsi status in spdk_iscsi_transfer_in

if the scsi status of the task is not GOOD, iscsi_transfer_in() returns
immediately. Hence checking it again is not necesasry.

Change-Id: I55cb025e97c8dcd51692303d0d21ce48b1185631
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/416315
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Shuhei Matsumoto 2018-06-19 11:38:46 +09:00 committed by Ben Walker
parent d4ef57c072
commit a5e7f17b88

View File

@ -2759,18 +2759,11 @@ spdk_iscsi_transfer_in(struct spdk_iscsi_conn *conn,
datain_flag |= ISCSI_FLAG_FINAL;
datain_flag &= ~ISCSI_DATAIN_STATUS;
if (task->scsi.sense_data_len == 0) {
switch (task->scsi.status) {
case SPDK_SCSI_STATUS_GOOD:
case SPDK_SCSI_STATUS_CONDITION_MET:
case SPDK_SCSI_STATUS_INTERMEDIATE:
case SPDK_SCSI_STATUS_INTERMEDIATE_CONDITION_MET:
/* The last pdu in all data-in pdus */
if ((offset + len) == transfer_len &&
(primary->bytes_completed ==
primary->scsi.transfer_len)) {
datain_flag |= ISCSI_DATAIN_STATUS;
sent_status = 1;
}
/* The last pdu in all data-in pdus */
if ((offset + len) == transfer_len &&
(primary->bytes_completed == primary->scsi.transfer_len)) {
datain_flag |= ISCSI_DATAIN_STATUS;
sent_status = 1;
}
}
} else {