diff options
author | phk <phk@FreeBSD.org> | 2003-10-18 11:11:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-10-18 11:11:05 +0000 |
commit | 902030340dd49238fc48826d11d9a1953825a93e (patch) | |
tree | aa3714385d4f6bb62b10138a03a519dc98089593 /sys | |
parent | 4f15f97a051d93249a5465a3992e79ebc8ecde37 (diff) | |
download | FreeBSD-src-902030340dd49238fc48826d11d9a1953825a93e.zip FreeBSD-src-902030340dd49238fc48826d11d9a1953825a93e.tar.gz |
Initialize bp->b_offset before calling VOP_[SPEC]STRATEGY().
Remove stale comment about B_PHYS.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/swap_pager.c | 1 | ||||
-rw-r--r-- | sys/vm/vnode_pager.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 749855d..c26e2eb 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -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; } diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index e6badfe..71b3ef2 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -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 |