diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 2004-05-11 13:17:40 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 2004-05-11 13:17:40 +0000 |
| commit | bbf15239ed8e517c6a3e5fb38599989c587563ee (patch) | |
| tree | 96049c9dbe336d86d4e5fd904da9a9f814f036e1 | |
| parent | 7076971c1a0d3c88db64ee2cf91257e0f291e630 (diff) | |
Notes
| -rw-r--r-- | sys/geom/geom_disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index aee02ebe602a..044238530d06 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -189,7 +189,6 @@ g_disk_done(struct bio *bp) bp->bio_completed = bp->bio_length - bp->bio_resid; bp2 = bp->bio_parent; - dp = bp2->bio_to->geom->softc; if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; @@ -197,7 +196,8 @@ g_disk_done(struct bio *bp) bp2->bio_inbed++; if (bp2->bio_children == bp2->bio_inbed) { bp2->bio_resid = bp2->bio_bcount - bp2->bio_completed; - devstat_end_transaction_bio(dp->d_devstat, bp2); + if ((dp = bp2->bio_to->geom->softc)) + devstat_end_transaction_bio(dp->d_devstat, bp2); g_io_deliver(bp2, bp2->bio_error); } mtx_unlock(&g_disk_done_mtx); |
