diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 19:00:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 19:00:42 -0800 |
commit | 6aad3738f6a79fd0ca480eaceefe064cc471f6eb (patch) | |
tree | 08fb9ec4824bf3320af01f29fe84b75f814c0fa0 /drivers/target/iscsi | |
parent | 02ebbbd481635fd3ce7018e5bb19c18c0f1e4561 (diff) | |
parent | 5bda90c8f20f0af93375721533f4081a40fa6f41 (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: use ->exectute_task for all CDB emulation
target: remove SCF_EMULATE_CDB_ASYNC
target: refactor transport_emulate_control_cdb
target: pass the se_task to the CDB emulation callback
target: split core_scsi3_emulate_pr
target: split core_scsi2_emulate_crh
target: Add generic active I/O shutdown logic
target: add back error handling in transport_complete_task
target/pscsi: blk_make_request() returns an ERR_PTR()
target: Remove core TRANSPORT_FREE_CMD_INTR usage
target: Make TFO->check_stop_free return free status
iscsi-target: Fix non-immediate TMR handling
iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd
target: Avoid double list_del for aborted se_tmr_req
target: Minor cleanups to core_tmr_drain_tmr_list
target: Fix wrong se_tmr being added to drain_tmr_list
target: Fix incorrect se_cmd assignment in core_tmr_drain_tmr_list
target: Check -ENOMEM to signal QUEUE_FULL from fabric callbacks
tcm_loop: Add explict read buffer memset for SCF_SCSI_CONTROL_SG_IO_CDB
target: Fix compile warning w/ missing module.h include
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 4d01768fcd9..1bf057ed993 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -1079,7 +1079,9 @@ attach_cmd: */ if (!cmd->immediate_data) { cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn); - if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) + if (cmdsn_ret == CMDSN_LOWER_THAN_EXP) + return 0; + else if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) return iscsit_add_reject_from_cmd( ISCSI_REASON_PROTOCOL_ERROR, 1, 0, buf, cmd); @@ -1819,17 +1821,16 @@ attach: int cmdsn_ret = iscsit_sequence_cmd(conn, cmd, hdr->cmdsn); if (cmdsn_ret == CMDSN_HIGHER_THAN_EXP) out_of_order_cmdsn = 1; - else if (cmdsn_ret == CMDSN_LOWER_THAN_EXP) { + else if (cmdsn_ret == CMDSN_LOWER_THAN_EXP) return 0; - } else { /* (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) */ + else if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) return iscsit_add_reject_from_cmd( ISCSI_REASON_PROTOCOL_ERROR, 1, 0, buf, cmd); - } } iscsit_ack_from_expstatsn(conn, hdr->exp_statsn); - if (out_of_order_cmdsn) + if (out_of_order_cmdsn || !(hdr->opcode & ISCSI_OP_IMMEDIATE)) return 0; /* * Found the referenced task, send to transport for processing. |