svn commit: r256606 - head/sys/geom
Alexander Motin
mav at FreeBSD.org
Wed Oct 16 09:18:02 UTC 2013
Author: mav
Date: Wed Oct 16 09:18:01 2013
New Revision: 256606
URL: http://svnweb.freebsd.org/changeset/base/256606
Log:
MFprojects/camlock r254907:
Move g_io_deliver() out of the lock, as required for direct dispatch.
Move g_destroy_bio() out too to reduce lock scope even more.
Modified:
head/sys/geom/geom_disk.c
Modified: head/sys/geom/geom_disk.c
==============================================================================
--- head/sys/geom/geom_disk.c Wed Oct 16 09:17:46 2013 (r256605)
+++ head/sys/geom/geom_disk.c Wed Oct 16 09:18:01 2013 (r256606)
@@ -245,13 +245,14 @@ g_disk_done(struct bio *bp)
bp2->bio_completed += bp->bio_completed;
if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0)
devstat_end_transaction_bio_bt(sc->dp->d_devstat, bp, &now);
- g_destroy_bio(bp);
bp2->bio_inbed++;
if (bp2->bio_children == bp2->bio_inbed) {
+ mtx_unlock(&sc->done_mtx);
bp2->bio_resid = bp2->bio_bcount - bp2->bio_completed;
g_io_deliver(bp2, bp2->bio_error);
- }
- mtx_unlock(&sc->done_mtx);
+ } else
+ mtx_unlock(&sc->done_mtx);
+ g_destroy_bio(bp);
}
static int
More information about the svn-src-all
mailing list