diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -63,6 +63,7 @@ #include #include +#include #include #include @@ -2554,22 +2555,16 @@ ufs2_daddr_t lbn; { struct inode *ip; - struct bio *bip; struct fs *fs; ip = VTOI(vp); fs = ITOFS(ip); - bip = g_alloc_bio(); - bip->bio_cmd = BIO_READ; - bip->bio_offset = dbtob(fsbtodb(fs, blkstofrags(fs, lbn))); - bip->bio_data = bp->b_data; - bip->bio_length = bp->b_bcount; - bip->bio_done = NULL; - - g_io_request(bip, ITODEVVP(ip)->v_bufobj.bo_private); - bp->b_error = biowait(bip, "snaprdb"); - g_destroy_bio(bip); + bp->b_iocmd = BIO_READ; + bp->b_iooffset = dbtob(fsbtodb(fs, blkstofrags(fs, lbn))); + bp->b_iodone = bdone; + g_vfs_strategy(&ITODEVVP(ip)->v_bufobj, bp); + bufwait(bp); return (bp->b_error); }