summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-18 11:14:29 +0000
committerphk <phk@FreeBSD.org>2003-10-18 11:14:29 +0000
commit1e371cc970ddeb5da92d1699444120a7d619df3d (patch)
treeeb47a6bb1dccc5f6377d586f29f84b28bf689ead /sys/nfsclient
parentbd00da531d31aa9d624805c19878a25c3a40f081 (diff)
downloadFreeBSD-src-1e371cc970ddeb5da92d1699444120a7d619df3d.zip
FreeBSD-src-1e371cc970ddeb5da92d1699444120a7d619df3d.tar.gz
Initialize bp->b_offset before calling VOP_STRATEGY().
Remove KASSERTS and panics with B_PHYS checks which no longer apply.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_bio.c5
-rw-r--r--sys/nfsclient/nfs_vnops.c4
2 files changed, 1 insertions, 8 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index a8044b4..442acbc 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -1292,11 +1292,6 @@ nfs_doio(struct buf *bp, struct ucred *cr, struct thread *td)
KASSERT(!(bp->b_flags & B_DONE), ("nfs_doio: bp %p already marked done", bp));
- /*
- * Historically, paging was done with physio, but no more.
- */
- KASSERT(!(bp->b_flags & B_PHYS), ("B_PHYS in nfs_doio"));
-
if (bp->b_iocmd == BIO_READ) {
io.iov_len = uiop->uio_resid = bp->b_bcount;
io.iov_base = bp->b_data;
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 652387f..71a7e58 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2568,9 +2568,6 @@ nfs_strategy(struct vop_strategy_args *ap)
KASSERT(!(bp->b_flags & B_DONE), ("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp));
KASSERT(BUF_REFCNT(bp) > 0, ("nfs_strategy: buffer %p not locked", bp));
- if (bp->b_flags & B_PHYS)
- panic("nfs physio");
-
if (bp->b_flags & B_ASYNC)
td = NULL;
else
@@ -2978,6 +2975,7 @@ nfs_writebp(struct buf *bp, int force, struct thread *td)
if (force)
bp->b_flags |= B_WRITEINPROG;
BUF_KERNPROC(bp);
+ bp->b_offset = dbtob(bp->b_blkno);
VOP_STRATEGY(bp->b_vp, bp);
if( (oldflags & B_ASYNC) == 0) {
OpenPOWER on IntegriCloud