[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>
此提交包含在:
@@ -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");
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者