Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY()
This commit is contained in:
parent
a4e276b47f
commit
0502229a3e
@ -196,6 +196,7 @@ ext2_bmaparray(vp, bn, bnp, 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);
|
||||
|
@ -404,6 +404,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
panic("ext2_indirtrunc: bad buffer size");
|
||||
bp->b_blkno = dbn;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(vp, bp);
|
||||
error = bufwait(bp);
|
||||
}
|
||||
|
@ -1484,6 +1484,7 @@ ext2_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);
|
||||
}
|
||||
|
@ -196,6 +196,7 @@ ext2_bmaparray(vp, bn, bnp, 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);
|
||||
|
@ -404,6 +404,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
|
||||
panic("ext2_indirtrunc: bad buffer size");
|
||||
bp->b_blkno = dbn;
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_offset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(vp, bp);
|
||||
error = bufwait(bp);
|
||||
}
|
||||
|
@ -1484,6 +1484,7 @@ ext2_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