ata: libata-scsi: simplify ata_scsi_requeue_deferred_qc()

In ata_scsi_requeue_deferred_qc(), use ata_qc_done() instead of calling
ata_qc_free() and scsi_done() directly.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
master
Damien Le Moal 2026-02-19 08:49:17 +09:00
parent a21b4040b3
commit 9a5eb2adb1
1 changed files with 2 additions and 5 deletions

View File

@ -1685,7 +1685,6 @@ void ata_scsi_deferred_qc_work(struct work_struct *work)
void ata_scsi_requeue_deferred_qc(struct ata_port *ap)
{
struct ata_queued_cmd *qc = ap->deferred_qc;
struct scsi_cmnd *scmd;
lockdep_assert_held(ap->lock);
@ -1697,11 +1696,9 @@ void ata_scsi_requeue_deferred_qc(struct ata_port *ap)
if (!qc)
return;
scmd = qc->scsicmd;
ap->deferred_qc = NULL;
ata_qc_free(qc);
scmd->result = (DID_SOFT_ERROR << 16);
scsi_done(scmd);
qc->scsicmd->result = (DID_SOFT_ERROR << 16);
ata_qc_done(qc);
}
static void ata_scsi_schedule_deferred_qc(struct ata_port *ap)