Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Aug 2015 10:53:54 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287286 - stable/10/sys/cam/ata
Message-ID:  <201508291053.t7TArsFp048286@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508291053.t7TArsFp048286>