diff options
author | phk <phk@FreeBSD.org> | 2003-10-18 11:16:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-10-18 11:16:33 +0000 |
commit | 3905ba5d0a37be7e523bd7f167e6338fffe83c6e (patch) | |
tree | 711947f28cdcb67a0efd23597a48ad790b92d654 /sys | |
parent | 1e371cc970ddeb5da92d1699444120a7d619df3d (diff) | |
download | FreeBSD-src-3905ba5d0a37be7e523bd7f167e6338fffe83c6e.zip FreeBSD-src-3905ba5d0a37be7e523bd7f167e6338fffe83c6e.tar.gz |
Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_inode.c | 1 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_bmap.c | 1 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index db90e4a..fa172c5 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -565,6 +565,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) panic("ffs_indirtrunc: bad buffer size"); bp->b_blkno = dbn; vfs_busy_pages(bp, 0); + bp->b_offset = dbtob(bp->b_blkno); VOP_STRATEGY(bp->b_vp, bp); error = bufwait(bp); } diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 960e3f6..f2296ea 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -228,6 +228,7 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) bp->b_flags &= ~B_INVAL; bp->b_ioflags &= ~BIO_ERROR; vfs_busy_pages(bp, 0); + bp->b_offset = dbtob(bp->b_blkno); VOP_STRATEGY(bp->b_vp, bp); curproc->p_stats->p_ru.ru_inblock++; /* XXX */ error = bufwait(bp); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 0e74031..bf2d378 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1969,6 +1969,7 @@ ufs_strategy(ap) } vp = ip->i_devvp; bp->b_dev = vp->v_rdev; + bp->b_offset = dbtob(bp->b_blkno); VOP_SPECSTRATEGY(vp, bp); return (0); } |