summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-18 19:49:46 +0000
committerphk <phk@FreeBSD.org>2003-10-18 19:49:46 +0000
commit50ecf36141a85b7c9a2e7b916a8942b5718d0056 (patch)
treea6a054cbd816f1384a8274bc047ef518883ca06f /sys/kern/vfs_bio.c
parent4b7ade98cde1002049c48964c16ea1959e55949b (diff)
downloadFreeBSD-src-50ecf36141a85b7c9a2e7b916a8942b5718d0056.zip
FreeBSD-src-50ecf36141a85b7c9a2e7b916a8942b5718d0056.tar.gz
Initialize b_iooffset before calling VOP_[SPEC]STRATEGY
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 81600cf..45c30f7 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -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
OpenPOWER on IntegriCloud