Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()

This commit is contained in:
Poul-Henning Kamp 2003-10-18 11:16:33 +00:00
parent 901b6327b1
commit 4e1694ecaf
3 changed files with 3 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}