svn commit: r287025 - head/sys/cam/ata
Alexander Motin
mav at FreeBSD.org
Sat Aug 22 15:58:36 UTC 2015
Author: mav
Date: Sat Aug 22 15:58:35 2015
New Revision: 287025
URL: https://svnweb.freebsd.org/changeset/base/287025
Log:
Remove some code duplication by using biofinish().
Submitted by: imp
MFC after: 1 week
Modified:
head/sys/cam/ata/ata_da.c
Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c Sat Aug 22 15:36:20 2015 (r287024)
+++ head/sys/cam/ata/ata_da.c Sat Aug 22 15:58:35 2015 (r287025)
@@ -1542,9 +1542,7 @@ adastart(struct cam_periph *periph, unio
} else {
/* This can happen if DMA was disabled. */
bioq_remove(&softc->trim_queue, bp);
- bp->bio_error = EOPNOTSUPP;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EOPNOTSUPP);
xpt_release_ccb(start_ccb);
adaschedule(periph);
return;
@@ -1609,9 +1607,7 @@ adastart(struct cam_periph *periph, unio
}
}
if (fail) {
- bp->bio_error = EIO;
- bp->bio_flags |= BIO_ERROR;
- biodone(bp);
+ biofinish(bp, NULL, EIO);
xpt_release_ccb(start_ccb);
adaschedule(periph);
return;
More information about the svn-src-all
mailing list