mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
scsi: target: Simplify transport_generic_free_cmd() (1/2)
Move identical code outside an if/else statement. This patch does not change any functionality. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Mike Christie <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
65422d705f
commit
a8864d861d
1 changed files with 2 additions and 6 deletions
|
|
@ -2664,9 +2664,6 @@ int transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
|
|||
if (!(cmd->se_cmd_flags & SCF_SE_LUN_CMD)) {
|
||||
if (wait_for_tasks && (cmd->se_cmd_flags & SCF_SCSI_TMR_CDB))
|
||||
target_wait_free_cmd(cmd, &aborted, &tas);
|
||||
|
||||
if (!aborted || tas)
|
||||
ret = target_put_sess_cmd(cmd);
|
||||
} else {
|
||||
if (wait_for_tasks)
|
||||
target_wait_free_cmd(cmd, &aborted, &tas);
|
||||
|
|
@ -2680,10 +2677,9 @@ int transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
|
|||
|
||||
if (cmd->se_lun)
|
||||
transport_lun_remove_cmd(cmd);
|
||||
|
||||
if (!aborted || tas)
|
||||
ret = target_put_sess_cmd(cmd);
|
||||
}
|
||||
if (!aborted || tas)
|
||||
ret = target_put_sess_cmd(cmd);
|
||||
if (aborted) {
|
||||
pr_debug("Detected CMD_T_ABORTED for ITT: %llu\n", cmd->tag);
|
||||
wait_for_completion(&cmd->cmd_wait_comp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue