Initialize bp->b_offset before calling VOP_STRATEGY().

Remove KASSERTS and panics with B_PHYS checks which no longer apply.
This commit is contained in:
Poul-Henning Kamp 2003-10-18 11:14:29 +00:00
parent 855c6fcc68
commit 901b6327b1
2 changed files with 1 additions and 8 deletions

View File

@ -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;

View File

@ -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) {