summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-04-30 21:21:53 +0000
committerphk <phk@FreeBSD.org>2001-04-30 21:21:53 +0000
commit781e8e261425ef8cb77955e0d30240040f4abae5 (patch)
treebe05c06710bc1c27bb837c92b53f6a939379ddac /sys/fs
parent9dbba1fac37004c6b391a3d372743a296bc6f559 (diff)
downloadFreeBSD-src-781e8e261425ef8cb77955e0d30240040f4abae5.zip
FreeBSD-src-781e8e261425ef8cb77955e0d30240040f4abae5.tar.gz
Uncut&paste som bogus use of VOP_BMAP in hpfs::VOP_STRATEGY.
At the same time, eliminate uninitialized use of a vnode pointer. Interesting GCC didn't spot this.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/hpfs/hpfs_vnops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c
index 500fd6c..40c847f 100644
--- a/sys/fs/hpfs/hpfs_vnops.c
+++ b/sys/fs/hpfs/hpfs_vnops.c
@@ -728,7 +728,7 @@ hpfs_print(ap)
* Calculate the logical to physical mapping if not done already,
* then call the device strategy routine.
*
- * In order to be able to swap to a file, the VOP_BMAP operation may not
+ * In order to be able to swap to a file, the hpfs_hpbmap operation may not
* deadlock on memory. See hpfs_bmap() for details. XXXXXXX (not impl)
*/
int
@@ -739,7 +739,7 @@ hpfs_strategy(ap)
{
register struct buf *bp = ap->a_bp;
register struct vnode *vp = ap->a_vp;
- struct vnode *nvp;
+ register struct hpfsnode *hp = VTOHP(ap->a_vp);
int error;
dprintf(("hpfs_strategy(): \n"));
@@ -747,9 +747,9 @@ hpfs_strategy(ap)
if (vp->v_type == VBLK || vp->v_type == VCHR)
panic("hpfs_strategy: spec");
if (bp->b_blkno == bp->b_lblkno) {
- error = VOP_BMAP(vp, bp->b_lblkno, &nvp, &bp->b_blkno, NULL, NULL);
+ error = hpfs_hpbmap (hp, bp->b_lblkno, &bp->b_blkno, NULL);
if (error) {
- printf("hpfs_strategy: VOP_BMAP FAILED %d\n", error);
+ printf("hpfs_strategy: hpfs_bpbmap FAILED %d\n", error);
bp->b_error = error;
bp->b_ioflags |= BIO_ERROR;
biodone(bp);
@@ -762,8 +762,8 @@ hpfs_strategy(ap)
biodone(bp);
return (0);
}
- bp->b_dev = nvp->v_rdev;
- VOP_STRATEGY(nvp, bp);
+ bp->b_dev = hp->h_devvp->v_rdev;
+ VOP_STRATEGY(hp->h_devvp, bp);
return (0);
}
OpenPOWER on IntegriCloud