[PATCH] libata: make ata_qc_issue complete failed qcs

There is no reason for the issuer to diddle with a failed qc as the
issuer has complete control over when a qc gets freed (usually in
->complete_fn).  Make ata_qc_issue() responsible for completing qcs
which failed to issue.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
此提交包含在:
Tejun Heo
2006-03-31 20:41:11 +09:00
提交者 Jeff Garzik
父節點 e4a70e76ad
當前提交 8e0e694a3a
共有 3 個檔案被更改,包括 12 行新增18 行删除

查看文件

@@ -1431,9 +1431,7 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
goto early_finish;
/* select device, send command to hardware */
qc->err_mask = ata_qc_issue(qc);
if (qc->err_mask)
ata_qc_complete(qc);
ata_qc_issue(qc);
VPRINTK("EXIT\n");
return;
@@ -2199,9 +2197,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
qc->complete_fn = atapi_sense_complete;
qc->err_mask = ata_qc_issue(qc);
if (qc->err_mask)
ata_qc_complete(qc);
ata_qc_issue(qc);
DPRINTK("EXIT\n");
}