Date: Sat, 22 Aug 2015 15:58:36 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287025 - head/sys/cam/ata Message-ID: <201508221558.t7MFwaug076081@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508221558.t7MFwaug076081>