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;
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to