svn commit: r287286 - stable/10/sys/cam/ata

Alexander Motin mav at FreeBSD.org
Sat Aug 29 10:53:54 UTC 2015


Author: mav
Date: Sat Aug 29 10:53:53 2015
New Revision: 287286
URL: https://svnweb.freebsd.org/changeset/base/287286

Log:
  MFC r287025: Remove some code duplication by using biofinish().

Modified:
  stable/10/sys/cam/ata/ata_da.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ata/ata_da.c
==============================================================================
--- stable/10/sys/cam/ata/ata_da.c	Sat Aug 29 10:52:16 2015	(r287285)
+++ stable/10/sys/cam/ata/ata_da.c	Sat Aug 29 10:53:53 2015	(r287286)
@@ -1535,9 +1535,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;
@@ -1602,9 +1600,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