Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY.

Remove various comments of KASSERTS and comments about B_PHYS which
does not apply anymore.
This commit is contained in:
Poul-Henning Kamp 2003-10-18 11:06:15 +00:00
parent a09aaeaa0f
commit c87b01a0fd
6 changed files with 3 additions and 3 deletions

View File

@ -674,6 +674,7 @@ hpfs_strategy(ap)
return (0);
}
bp->b_dev = hp->h_devvp->v_rdev;
bp->b_offset = dbtob(bp->b_blkno);
VOP_SPECSTRATEGY(hp->h_devvp, bp);
return (0);
}

View File

@ -1785,6 +1785,7 @@ msdosfs_strategy(ap)
*/
vp = dep->de_devvp;
bp->b_dev = vp->v_rdev;
bp->b_offset = dbtob(bp->b_blkno);
VOP_SPECSTRATEGY(vp, bp);
return (0);
}

View File

@ -799,7 +799,6 @@ static int nwfs_strategy (ap)
KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)",
__func__, ap->a_vp, ap->a_bp->b_vp));
NCPVNDEBUG("\n");
KASSERT(!(bp->b_flags & B_PHYS), ("nwfs physio"));
if (bp->b_flags & B_ASYNC)
td = (struct thread *)0;
else

View File

@ -845,7 +845,6 @@ smbfs_strategy (ap)
KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)",
__func__, ap->a_vp, ap->a_bp->b_vp));
SMBVDEBUG("\n");
KASSERT(!(bp->b_flags & B_PHYS), ("smbfs physio"));
if (bp->b_flags & B_ASYNC)
td = (struct thread *)0;
else

View File

@ -730,7 +730,6 @@ spec_getpages(ap)
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);

View File

@ -839,6 +839,7 @@ udf_strategy(struct vop_strategy_args *a)
}
vp = node->i_devvp;
bp->b_dev = vp->v_rdev;
bp->b_offset = dbtob(bp->b_blkno);
VOP_SPECSTRATEGY(vp, bp);
return (0);
}