mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 06:06:44 +07:00
scsi: target: Simplify core_tmr_handle_tas_abort()
The code that can set CMD_T_TAS is executed by the same thread as the thread that executes core_tmr_handle_tas_abort(). That means that no locking is needed to check CMD_T_TAS from inside core_tmr_handle_tas_abort(). This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
953bcf7ad1
commit
709d56512f
@ -77,21 +77,12 @@ void core_tmr_release_req(struct se_tmr_req *tmr)
|
||||
|
||||
static int core_tmr_handle_tas_abort(struct se_cmd *cmd, int tas)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool remove = true, send_tas;
|
||||
/*
|
||||
* TASK ABORTED status (TAS) bit support
|
||||
*/
|
||||
spin_lock_irqsave(&cmd->t_state_lock, flags);
|
||||
send_tas = (cmd->transport_state & CMD_T_TAS);
|
||||
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
|
||||
bool send_tas = cmd->transport_state & CMD_T_TAS;
|
||||
|
||||
if (send_tas) {
|
||||
remove = false;
|
||||
if (send_tas)
|
||||
transport_send_task_abort(cmd);
|
||||
}
|
||||
|
||||
return transport_cmd_finish_abort(cmd, remove);
|
||||
return transport_cmd_finish_abort(cmd, !send_tas);
|
||||
}
|
||||
|
||||
static int target_check_cdb_and_preempt(struct list_head *list,
|
||||
|
Loading…
Reference in New Issue
Block a user