Commit c18bc7d8 authored by Roland Dreier's avatar Roland Dreier Committed by Nicholas Bellinger

target: Clean up flow in transport_check_aborted_status()

Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
parent d9ed6947
...@@ -2761,23 +2761,19 @@ EXPORT_SYMBOL(transport_send_check_condition_and_sense); ...@@ -2761,23 +2761,19 @@ EXPORT_SYMBOL(transport_send_check_condition_and_sense);
int transport_check_aborted_status(struct se_cmd *cmd, int send_status) int transport_check_aborted_status(struct se_cmd *cmd, int send_status)
{ {
int ret = 0; if (!(cmd->transport_state & CMD_T_ABORTED))
return 0;
if (cmd->transport_state & CMD_T_ABORTED) { if (!send_status || (cmd->se_cmd_flags & SCF_SENT_DELAYED_TAS))
if (!send_status || return 1;
(cmd->se_cmd_flags & SCF_SENT_DELAYED_TAS))
return 1;
pr_debug("Sending delayed SAM_STAT_TASK_ABORTED" pr_debug("Sending delayed SAM_STAT_TASK_ABORTED status for CDB: 0x%02x ITT: 0x%08x\n",
" status for CDB: 0x%02x ITT: 0x%08x\n", cmd->t_task_cdb[0], cmd->se_tfo->get_task_tag(cmd));
cmd->t_task_cdb[0],
cmd->se_tfo->get_task_tag(cmd));
cmd->se_cmd_flags |= SCF_SENT_DELAYED_TAS; cmd->se_cmd_flags |= SCF_SENT_DELAYED_TAS;
cmd->se_tfo->queue_status(cmd); cmd->se_tfo->queue_status(cmd);
ret = 1;
} return 1;
return ret;
} }
EXPORT_SYMBOL(transport_check_aborted_status); EXPORT_SYMBOL(transport_check_aborted_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment