|
@@ -4919,6 +4919,15 @@ EXPORT_SYMBOL(transport_check_aborted_status);
|
|
|
|
|
|
void transport_send_task_abort(struct se_cmd *cmd)
|
|
|
{
|
|
|
+ unsigned long flags;
|
|
|
+
|
|
|
+ spin_lock_irqsave(&cmd->t_state_lock, flags);
|
|
|
+ if (cmd->se_cmd_flags & SCF_SENT_CHECK_CONDITION) {
|
|
|
+ spin_unlock_irqrestore(&cmd->t_state_lock, flags);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ spin_unlock_irqrestore(&cmd->t_state_lock, flags);
|
|
|
+
|
|
|
/*
|
|
|
* If there are still expected incoming fabric WRITEs, we wait
|
|
|
* until until they have completed before sending a TASK_ABORTED
|