diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 2209c6680be..de5cde68a7d 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1241,10 +1241,10 @@ md_kthread(void *arg) if (error != -1) { bp->bio_completed = bp->bio_length; - if ((bp->bio_cmd == BIO_READ) || (bp->bio_cmd == BIO_WRITE)) - devstat_end_transaction_bio(sc->devstat, bp); g_io_deliver(bp, error); } + if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) + devstat_end_transaction_bio(sc->devstat, bp); } }