From 066a8fea81177854491911716c3cfce4e502002f Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 7 Sep 2004 08:53:28 +0000 Subject: [PATCH] Explicitly pass vnode to smbfs_doio() function. --- sys/fs/smbfs/smbfs.h | 2 +- sys/fs/smbfs/smbfs_io.c | 3 +-- sys/fs/smbfs/smbfs_vnops.c | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/fs/smbfs/smbfs.h b/sys/fs/smbfs/smbfs.h index 50487916826f..1b9b9cab7147 100644 --- a/sys/fs/smbfs/smbfs.h +++ b/sys/fs/smbfs/smbfs.h @@ -98,7 +98,7 @@ struct smbmount { #define VTOSMBFS(vp) (VFSTOSMBFS(VTOVFS(vp))) int smbfs_ioctl(struct vop_ioctl_args *ap); -int smbfs_doio(struct buf *bp, struct ucred *cr, struct thread *td); +int smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td); int smbfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, struct thread *td, int intrflg); #endif /* KERNEL */ diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 6a1ea45b3642..752e858f73a0 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -303,9 +303,8 @@ smbfs_writevnode(struct vnode *vp, struct uio *uiop, * Do an I/O operation to/from a cache block. */ int -smbfs_doio(struct buf *bp, struct ucred *cr, struct thread *td) +smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td) { - struct vnode *vp = bp->b_vp; struct smbmount *smp = VFSTOSMBFS(vp->v_mount); struct smbnode *np = VTOSMB(vp); struct uio uio, *uiop = &uio; diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index c051b695296e..e899aab88260 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -854,8 +854,6 @@ smbfs_strategy (ap) struct thread *td; int error = 0; - KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)", - __func__, ap->a_vp, ap->a_bp->b_vp)); SMBVDEBUG("\n"); if (bp->b_flags & B_ASYNC) td = (struct thread *)0; @@ -867,7 +865,7 @@ smbfs_strategy (ap) cr = bp->b_wcred; if ((bp->b_flags & B_ASYNC) == 0 ) - error = smbfs_doio(bp, cr, td); + error = smbfs_doio(ap->a_vp, bp, cr, td); return error; }