[PATCH] libata: fix ata_qc_issue() error handling
authorTejun Heo <htejun@gmail.com>
Mon, 23 Jan 2006 04:09:36 +0000 (13:09 +0900)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 27 Jan 2006 03:33:50 +0000 (22:33 -0500)
commit8e436af9326f5cc2e07d76505154ffddfb04b485
tree26d5a6716ff3c164613811a78e5a06c353d28fe3
parent77853bf2b48e34449e826a9ef4df5ea0dbe947f4
[PATCH] libata: fix ata_qc_issue() error handling

When ata_qc_issue() fails, the qc might have been dma mapped or not.
So, performing only ata_qc_free() results in dma map leak.  This patch
makes ata_qc_issue() mark dma map flags correctly on failure and calls
ata_qc_complete() after ata_qc_issue() fails.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/scsi/libata-core.c
drivers/scsi/libata-scsi.c