Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/dkwedge/dk.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/dkwedge/dk.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.33.6.3 retrieving revision 1.33.6.4 diff -u -p -r1.33.6.3 -r1.33.6.4 --- src/sys/dev/dkwedge/dk.c 2008/06/02 13:23:15 1.33.6.3 +++ src/sys/dev/dkwedge/dk.c 2008/06/05 19:14:35 1.33.6.4 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.33.6.3 2008/06/02 13:23:15 mjf Exp $ */ +/* $NetBSD: dk.c,v 1.33.6.4 2008/06/05 19:14:35 mjf Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.33.6.3 2008/06/02 13:23:15 mjf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.33.6.4 2008/06/05 19:14:35 mjf Exp $"); #include "opt_dkwedge.h" @@ -862,22 +862,22 @@ int dkwedge_read(struct disk *pdk, struct vnode *vp, daddr_t blkno, void *tbuf, size_t len) { - struct buf b; + struct buf *bp; int result; - buf_init(&b); + bp = getiobuf(vp, true); + + bp->b_dev = vp->v_rdev; + bp->b_blkno = blkno; + bp->b_bcount = len; + bp->b_resid = len; + bp->b_flags = B_READ; + bp->b_data = tbuf; + + VOP_STRATEGY(vp, bp); + result = biowait(bp); + putiobuf(bp); - b.b_vp = vp; - b.b_dev = vp->v_rdev; - b.b_blkno = blkno; - b.b_bcount = b.b_resid = len; - b.b_flags = B_READ; - b.b_proc = curproc; - b.b_data = tbuf; - - VOP_STRATEGY(vp, &b); - result = biowait(&b); - buf_destroy(&b); return result; }