mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Initialize b_iooffset before calling VOP_[SPEC]STRATEGY
This commit is contained in:
parent
01758670e9
commit
2d6a9d0747
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121224
@ -707,6 +707,7 @@ breadn(struct vnode * vp, daddr_t blkno, int size,
|
||||
if (bp->b_rcred == NOCRED && cred != NOCRED)
|
||||
bp->b_rcred = crhold(cred);
|
||||
vfs_busy_pages(bp, 0);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
if (vp->v_type == VCHR)
|
||||
VOP_SPECSTRATEGY(vp, bp);
|
||||
else
|
||||
@ -730,6 +731,7 @@ breadn(struct vnode * vp, daddr_t blkno, int size,
|
||||
rabp->b_rcred = crhold(cred);
|
||||
vfs_busy_pages(rabp, 0);
|
||||
BUF_KERNPROC(rabp);
|
||||
rabp->b_iooffset = dbtob(rabp->b_blkno);
|
||||
if (vp->v_type == VCHR)
|
||||
VOP_SPECSTRATEGY(vp, rabp);
|
||||
else
|
||||
@ -871,6 +873,7 @@ bwrite(struct buf * bp)
|
||||
splx(s);
|
||||
if (oldflags & B_ASYNC)
|
||||
BUF_KERNPROC(bp);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
if (bp->b_vp->v_type == VCHR)
|
||||
VOP_SPECSTRATEGY(bp->b_vp, bp);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user