Split out the vnode and buf arguments to the internal strategy worker

routine instead of doing evil casts.
This commit is contained in:
Poul-Henning Kamp 2003-01-05 09:55:26 +00:00
parent bda19384a1
commit 973418dbf5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108706

View file

@ -68,7 +68,6 @@ static int spec_poll(struct vop_poll_args *);
static int spec_print(struct vop_print_args *);
static int spec_read(struct vop_read_args *);
static int spec_strategy(struct vop_strategy_args *);
static int spec_xstrategy(struct vop_strategy_args *);
static int spec_specstrategy(struct vop_specstrategy_args *);
static int spec_write(struct vop_write_args *);
@ -524,22 +523,13 @@ SYSCTL_INT(_debug, OID_AUTO, doslowdown, CTLFLAG_RW, &doslowdown, 0, "");
* Just call the device strategy routine
*/
static int
spec_xstrategy(ap)
struct vop_strategy_args /* {
struct vnode *a_vp;
struct buf *a_bp;
} */ *ap;
spec_xstrategy(struct vnode *vp, struct buf *bp)
{
struct buf *bp;
struct vnode *vp;
struct mount *mp;
int error;
struct cdevsw *dsw;
struct thread *td = curthread;
bp = ap->a_bp;
vp = ap->a_vp;
KASSERT(bp->b_iocmd == BIO_READ ||
bp->b_iocmd == BIO_WRITE ||
bp->b_iocmd == BIO_DELETE,
@ -632,7 +622,7 @@ spec_strategy(ap)
backtrace();
once++;
}
return spec_xstrategy(ap);
return spec_xstrategy(ap->a_vp, ap->a_bp);
}
static int
@ -643,7 +633,7 @@ spec_specstrategy(ap)
} */ *ap;
{
return spec_xstrategy((void *)ap);
return spec_xstrategy(ap->a_vp, ap->a_bp);
}
static int