Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()
This commit is contained in:
parent
901b6327b1
commit
4e1694ecaf
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user