aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-11-16 11:06:19 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2012-11-28 01:49:18 -0500
commitc18bc7d8d34103d4bae47db180b508413f98dc36 (patch)
treef3c8e79c10e502908df0cbc4eb2f607ed5636a0d /drivers/target
parentd9ed69473a345d69cf15831e8db22f159b13cdd2 (diff)
target: Clean up flow in transport_check_aborted_status()
Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 7e7fa58b56ea..1ebde4c56847 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2761,23 +2761,19 @@ EXPORT_SYMBOL(transport_send_check_condition_and_sense);
2761 2761
2762int transport_check_aborted_status(struct se_cmd *cmd, int send_status) 2762int transport_check_aborted_status(struct se_cmd *cmd, int send_status)
2763{ 2763{
2764 int ret = 0; 2764 if (!(cmd->transport_state & CMD_T_ABORTED))
2765 return 0;
2765 2766
2766 if (cmd->transport_state & CMD_T_ABORTED) { 2767 if (!send_status || (cmd->se_cmd_flags & SCF_SENT_DELAYED_TAS))
2767 if (!send_status || 2768 return 1;
2768 (cmd->se_cmd_flags & SCF_SENT_DELAYED_TAS))
2769 return 1;
2770 2769
2771 pr_debug("Sending delayed SAM_STAT_TASK_ABORTED" 2770 pr_debug("Sending delayed SAM_STAT_TASK_ABORTED status for CDB: 0x%02x ITT: 0x%08x\n",
2772 " status for CDB: 0x%02x ITT: 0x%08x\n", 2771 cmd->t_task_cdb[0], cmd->se_tfo->get_task_tag(cmd));
2773 cmd->t_task_cdb[0],
2774 cmd->se_tfo->get_task_tag(cmd));
2775 2772
2776 cmd->se_cmd_flags |= SCF_SENT_DELAYED_TAS; 2773 cmd->se_cmd_flags |= SCF_SENT_DELAYED_TAS;
2777 cmd->se_tfo->queue_status(cmd); 2774 cmd->se_tfo->queue_status(cmd);
2778 ret = 1; 2775
2779 } 2776 return 1;
2780 return ret;
2781} 2777}
2782EXPORT_SYMBOL(transport_check_aborted_status); 2778EXPORT_SYMBOL(transport_check_aborted_status);
2783 2779