1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

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

Remove stale comment about B_PHYS.
This commit is contained in:
Poul-Henning Kamp 2003-10-18 11:11:05 +00:00
parent f14676dc6f
commit 9fbf91c0dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121199
2 changed files with 3 additions and 1 deletions

View File

@ -2541,6 +2541,7 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp)
}
bp->b_vp = vp2;
splx(s);
bp->b_offset = dbtob(bp->b_blkno);
VOP_STRATEGY(vp2, bp);
return;
}

View File

@ -478,6 +478,7 @@ vnode_pager_input_smlfs(object, m)
runningbufspace += bp->b_runningbufspace;
/* do the input */
bp->b_offset = dbtob(bp->b_blkno);
VOP_SPECSTRATEGY(bp->b_vp, bp);
/* we definitely need to be at splvm here */
@ -801,7 +802,6 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
/* build a minimal buffer header */
bp->b_iocmd = BIO_READ;
bp->b_iodone = bdone;
/* B_PHYS is not set, but it is nice to fill this in */
KASSERT(bp->b_rcred == NOCRED, ("leaking read ucred"));
KASSERT(bp->b_wcred == NOCRED, ("leaking write ucred"));
bp->b_rcred = crhold(curthread->td_ucred);
@ -817,6 +817,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
cnt.v_vnodepgsin += count;
/* do the input */
bp->b_offset = dbtob(bp->b_blkno);
if (dp->v_type == VCHR)
VOP_SPECSTRATEGY(bp->b_vp, bp);
else