Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+2 -5
+2 -5
drivers/ata/libata-scsi.c
··· 1685 1685 void ata_scsi_requeue_deferred_qc(struct ata_port *ap) 1686 1686 { 1687 1687 struct ata_queued_cmd *qc = ap->deferred_qc; 1688 - struct scsi_cmnd *scmd; 1689 1688 1690 1689 lockdep_assert_held(ap->lock); 1691 1690 ··· 1696 1697 if (!qc) 1697 1698 return; 1698 1699 1699 - scmd = qc->scsicmd; 1700 1700 ap->deferred_qc = NULL; 1701 - ata_qc_free(qc); 1702 - scmd->result = (DID_SOFT_ERROR << 16); 1703 - scsi_done(scmd); 1701 + qc->scsicmd->result = (DID_SOFT_ERROR << 16); 1702 + ata_qc_done(qc); 1704 1703 } 1705 1704 1706 1705 static void ata_scsi_schedule_deferred_qc(struct ata_port *ap)