summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-10-17 23:56:47 +0000
committergrog <grog@FreeBSD.org>1999-10-17 23:56:47 +0000
commit5ccb30bf1f72b4f7adea3a16e531df51b82a43df (patch)
treeb3256478379adfe551b961bc07513c79cd998ebf
parenta1894992f3a34ed9a115828857bb2e6050aaca93 (diff)
downloadFreeBSD-src-5ccb30bf1f72b4f7adea3a16e531df51b82a43df.zip
FreeBSD-src-5ccb30bf1f72b4f7adea3a16e531df51b82a43df.tar.gz
sdio_done:
Set the errors in the correct buffer header. Inspection-provoked-by: Bernd Walter <ticso@cicely.de>
-rw-r--r--sys/dev/vinum/vinuminterrupt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c
index 6f02fee..7e1c242 100644
--- a/sys/dev/vinum/vinuminterrupt.c
+++ b/sys/dev/vinum/vinuminterrupt.c
@@ -39,7 +39,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinuminterrupt.c,v 1.7 1999/10/12 04:34:50 grog Exp grog $
+ * $Id$
* $FreeBSD$
*/
@@ -208,27 +208,27 @@ sdio_done(struct buf *bp)
sbp = (struct sdbuf *) bp;
if (sbp->b.b_flags & B_ERROR) { /* had an error */
- bp->b_flags |= B_ERROR;
- bp->b_error = sbp->b.b_error;
+ sbp->bp->b_flags |= B_ERROR; /* propagate upwards */
+ sbp->bp->b_error = sbp->b.b_error;
}
#ifdef VINUMDEBUG
if (debug & DEBUG_LASTREQS)
logrq(loginfo_sdiodone, (union rqinfou) bp, bp);
#endif
sbp->bp->b_resid = sbp->b.b_resid; /* copy the resid field */
- biodone(sbp->bp); /* complete the caller's I/O */
/* Now update the statistics */
if (bp->b_flags & B_READ) { /* read operation */
DRIVE[sbp->driveno].reads++;
- DRIVE[sbp->driveno].bytes_read += bp->b_bcount;
+ DRIVE[sbp->driveno].bytes_read += sbp->b.b_bcount;
SD[sbp->sdno].reads++;
- SD[sbp->sdno].bytes_read += bp->b_bcount;
+ SD[sbp->sdno].bytes_read += sbp->b.b_bcount;
} else { /* write operation */
DRIVE[sbp->driveno].writes++;
- DRIVE[sbp->driveno].bytes_written += bp->b_bcount;
+ DRIVE[sbp->driveno].bytes_written += sbp->b.b_bcount;
SD[sbp->sdno].writes++;
- SD[sbp->sdno].bytes_written += bp->b_bcount;
+ SD[sbp->sdno].bytes_written += sbp->b.b_bcount;
}
+ biodone(sbp->bp); /* complete the caller's I/O */
Free(sbp);
}
OpenPOWER on IntegriCloud