Index: sys/nfsclient/nfs_vnops.c =================================================================== --- sys/nfsclient/nfs_vnops.c (revision 199789) +++ sys/nfsclient/nfs_vnops.c (working copy) @@ -509,6 +509,7 @@ nfs_open(struct vop_open_args *ap) { struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); + struct thread *td = curthread; struct vattr vattr; int error; int fmode = ap->a_mode; @@ -522,7 +523,7 @@ nfs_open(struct vop_open_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & NMODIFIED) { mtx_unlock(&np->n_mtx); - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, td, 1); if (error == EINTR || error == EIO) return (error); np->n_attrstamp = 0; @@ -536,7 +537,6 @@ nfs_open(struct vop_open_args *ap) np->n_mtime = vattr.va_mtime; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; if (np->n_ac_ts_syscalls != td->td_syscalls || np->n_ac_ts_tid != td->td_tid || @@ -554,7 +554,7 @@ nfs_open(struct vop_open_args *ap) if (vp->v_type == VDIR) np->n_direofoffset = 0; mtx_unlock(&np->n_mtx); - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, td, 1); if (error == EINTR || error == EIO) { return (error); } @@ -568,7 +568,7 @@ nfs_open(struct vop_open_args *ap) */ if (nfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, td, 1); if (error) return (error); mtx_lock(&np->n_mtx); @@ -577,7 +577,7 @@ nfs_open(struct vop_open_args *ap) } np->n_directio_opens++; } - vnode_create_vobject(vp, vattr.va_size, ap->a_td); + vnode_create_vobject(vp, vattr.va_size, td); return (0); } Index: sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c =================================================================== --- sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c (revision 199789) +++ sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c (working copy) @@ -197,7 +197,6 @@ _xfs_open( struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; struct file *a_fp; } */ *ap) { @@ -205,7 +204,7 @@ _xfs_open( XVOP_OPEN(VPTOXFSVP(ap->a_vp), ap->a_cred, error); if (error == 0) - vnode_create_vobject(ap->a_vp, 0, ap->a_td); + vnode_create_vobject(ap->a_vp, 0, curthread); return (error); } Index: sys/gnu/fs/reiserfs/reiserfs_vnops.c =================================================================== --- sys/gnu/fs/reiserfs/reiserfs_vnops.c (revision 199789) +++ sys/gnu/fs/reiserfs/reiserfs_vnops.c (working copy) @@ -156,7 +156,7 @@ reiserfs_open(struct vop_open_args *ap) (ap->a_mode & (FWRITE | O_APPEND)) == FWRITE) return (EPERM); - vnode_create_vobject(ap->a_vp, VTOI(ap->a_vp)->i_size, ap->a_td); + vnode_create_vobject(ap->a_vp, VTOI(ap->a_vp)->i_size, curthread); return (0); } Index: sys/gnu/fs/ext2fs/ext2_vnops.c =================================================================== --- sys/gnu/fs/ext2fs/ext2_vnops.c (revision 199789) +++ sys/gnu/fs/ext2fs/ext2_vnops.c (working copy) @@ -238,7 +238,6 @@ ext2_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { @@ -252,7 +251,7 @@ ext2_open(ap) (ap->a_mode & (FWRITE | O_APPEND)) == FWRITE) return (EPERM); - vnode_create_vobject(ap->a_vp, VTOI(ap->a_vp)->i_size, ap->a_td); + vnode_create_vobject(ap->a_vp, VTOI(ap->a_vp)->i_size, curthread); return (0); } Index: sys/ufs/ufs/ufs_extattr.c =================================================================== --- sys/ufs/ufs/ufs_extattr.c (revision 199789) +++ sys/ufs/ufs/ufs_extattr.c (working copy) @@ -326,7 +326,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, { int error; - error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td, NULL); + error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, NULL); if (error) { printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed " "with %d\n", error); Index: sys/ufs/ufs/ufs_vnops.c =================================================================== --- sys/ufs/ufs/ufs_vnops.c (revision 199789) +++ sys/ufs/ufs/ufs_vnops.c (working copy) @@ -267,7 +267,7 @@ ufs_open(struct vop_open_args *ap) if ((ip->i_flags & APPEND) && (ap->a_mode & (FWRITE | O_APPEND)) == FWRITE) return (EPERM); - vnode_create_vobject(vp, DIP(ip, i_size), ap->a_td); + vnode_create_vobject(vp, DIP(ip, i_size), curthread); return (0); } Index: sys/kern/uipc_mqueue.c =================================================================== --- sys/kern/uipc_mqueue.c (revision 199789) +++ sys/kern/uipc_mqueue.c (working copy) @@ -1097,7 +1097,6 @@ struct vop_open_args { struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; struct file *a_fp; }; #endif Index: sys/kern/vfs_vnops.c =================================================================== --- sys/kern/vfs_vnops.c (revision 199789) +++ sys/kern/vfs_vnops.c (working copy) @@ -231,7 +231,7 @@ restart: goto bad; } } - if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) + if ((error = VOP_OPEN(vp, fmode, cred, fp)) != 0) goto bad; if (fmode & FWRITE) Index: sys/kern/vfs_syscalls.c =================================================================== --- sys/kern/vfs_syscalls.c (revision 199789) +++ sys/kern/vfs_syscalls.c (working copy) @@ -4466,7 +4466,7 @@ fhopen(td, uap) if (error) goto bad; } - error = VOP_OPEN(vp, fmode, td->td_ucred, td, NULL); + error = VOP_OPEN(vp, fmode, td->td_ucred, NULL); if (error) goto bad; Index: sys/kern/kern_exec.c =================================================================== --- sys/kern/kern_exec.c (revision 199789) +++ sys/kern/kern_exec.c (working copy) @@ -1358,7 +1358,7 @@ exec_check_permissions(imgp) * Call filesystem specific open routine (which does nothing in the * general case). */ - error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); + error = VOP_OPEN(vp, FREAD, td->td_ucred, NULL); if (error == 0) imgp->opened = 1; return (error); Index: sys/kern/vnode_if.src =================================================================== --- sys/kern/vnode_if.src (revision 199789) +++ sys/kern/vnode_if.src (working copy) @@ -128,7 +128,6 @@ vop_open { IN struct vnode *vp; IN int mode; IN struct ucred *cred; - IN struct thread *td; IN struct file *fp; }; Index: sys/fs/unionfs/union_subr.c =================================================================== --- sys/fs/unionfs/union_subr.c (revision 199789) +++ sys/fs/unionfs/union_subr.c (working copy) @@ -943,7 +943,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, str if ((error = VOP_CREATE(udvp, &vp, &cn, uvap)) != 0) goto unionfs_vn_create_on_upper_free_out1; - if ((error = VOP_OPEN(vp, fmode, cred, td, NULL)) != 0) { + if ((error = VOP_OPEN(vp, fmode, cred, NULL)) != 0) { vput(vp); goto unionfs_vn_create_on_upper_free_out1; } @@ -1075,7 +1075,7 @@ unionfs_copyfile(struct unionfs_node *unp, int doc } if (docopy != 0) { - error = VOP_OPEN(lvp, FREAD, cred, td, NULL); + error = VOP_OPEN(lvp, FREAD, cred, NULL); if (error == 0) { error = unionfs_copyfile_core(lvp, uvp, cred, td); VOP_CLOSE(lvp, FREAD, cred, td); @@ -1142,7 +1142,7 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred #endif if ((error = VOP_ACCESS(vp, VEXEC|VREAD, cred, td)) != 0) return (error); - if ((error = VOP_OPEN(vp, FREAD, cred, td, NULL)) != 0) + if ((error = VOP_OPEN(vp, FREAD, cred, NULL)) != 0) return (error); uio.uio_rw = UIO_READ; Index: sys/fs/unionfs/union_vnops.c =================================================================== --- sys/fs/unionfs/union_vnops.c (revision 199789) +++ sys/fs/unionfs/union_vnops.c (working copy) @@ -495,7 +495,7 @@ unionfs_open(struct vop_open_args *ap) lvp = unp->un_lowervp; targetvp = NULLVP; cred = ap->a_cred; - td = ap->a_td; + td = curthread; unionfs_get_node_status(unp, td, &unsp); @@ -524,13 +524,13 @@ unionfs_open(struct vop_open_args *ap) targetvp = uvp; } - error = VOP_OPEN(targetvp, ap->a_mode, cred, td, ap->a_fp); + error = VOP_OPEN(targetvp, ap->a_mode, cred, ap->a_fp); if (error == 0) { if (targetvp == uvp) { if (uvp->v_type == VDIR && lvp != NULLVP && unsp->uns_lower_opencnt <= 0) { /* open lower for readdir */ - error = VOP_OPEN(lvp, FREAD, cred, td, NULL); + error = VOP_OPEN(lvp, FREAD, cred, NULL); if (error != 0) { VOP_CLOSE(uvp, ap->a_mode, cred, td); goto unionfs_open_abort; @@ -2003,7 +2003,7 @@ unionfs_advlock(struct vop_advlock_args *ap) if (unsp->uns_lower_opencnt > 0) { /* try reopen the vnode */ error = VOP_OPEN(uvp, unsp->uns_lower_openmode, - td->td_ucred, td, NULL); + td->td_ucred, NULL); if (error) goto unionfs_advlock_abort; unsp->uns_upper_opencnt++; Index: sys/fs/nfsclient/nfs_clvnops.c =================================================================== --- sys/fs/nfsclient/nfs_clvnops.c (revision 199789) +++ sys/fs/nfsclient/nfs_clvnops.c (working copy) @@ -486,6 +486,7 @@ nfs_open(struct vop_open_args *ap) { struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); + struct thread *td = curthread; struct vattr vattr; int error; int fmode = ap->a_mode; @@ -498,9 +499,9 @@ nfs_open(struct vop_open_args *ap) * so that we conform to RFC3530 Sec. 9.3.1. */ if (NFS_ISV4(vp)) { - error = nfsrpc_open(vp, fmode, ap->a_cred, ap->a_td); + error = nfsrpc_open(vp, fmode, ap->a_cred, td); if (error) { - error = nfscl_maperr(ap->a_td, error, (uid_t)0, + error = nfscl_maperr(td, error, (uid_t)0, (gid_t)0); return (error); } @@ -514,10 +515,10 @@ nfs_open(struct vop_open_args *ap) mtx_lock(&np->n_mtx); if (np->n_flag & NMODIFIED) { mtx_unlock(&np->n_mtx); - error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + error = ncl_vinvalbuf(vp, V_SAVE, td, 1); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) - (void) nfsrpc_close(vp, 0, ap->a_td); + (void) nfsrpc_close(vp, 0, td); return (error); } np->n_attrstamp = 0; @@ -526,7 +527,7 @@ nfs_open(struct vop_open_args *ap) error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) { if (NFS_ISV4(vp)) - (void) nfsrpc_close(vp, 0, ap->a_td); + (void) nfsrpc_close(vp, 0, td); return (error); } mtx_lock(&np->n_mtx); @@ -535,8 +536,6 @@ nfs_open(struct vop_open_args *ap) np->n_change = vattr.va_filerev; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - if (np->n_ac_ts_syscalls != td->td_syscalls || np->n_ac_ts_tid != td->td_tid || td->td_proc == NULL || @@ -547,7 +546,7 @@ nfs_open(struct vop_open_args *ap) error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) { if (NFS_ISV4(vp)) - (void) nfsrpc_close(vp, 0, ap->a_td); + (void) nfsrpc_close(vp, 0, td); return (error); } mtx_lock(&np->n_mtx); @@ -556,11 +555,10 @@ nfs_open(struct vop_open_args *ap) if (vp->v_type == VDIR) np->n_direofoffset = 0; mtx_unlock(&np->n_mtx); - error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + error = ncl_vinvalbuf(vp, V_SAVE, td, 1); if (error == EINTR || error == EIO) { if (NFS_ISV4(vp)) - (void) nfsrpc_close(vp, 0, - ap->a_td); + (void) nfsrpc_close(vp, 0, td); return (error); } mtx_lock(&np->n_mtx); @@ -577,10 +575,10 @@ nfs_open(struct vop_open_args *ap) */ if (newnfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { - error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); + error = ncl_vinvalbuf(vp, V_SAVE, td, 1); if (error) { if (NFS_ISV4(vp)) - (void) nfsrpc_close(vp, 0, ap->a_td); + (void) nfsrpc_close(vp, 0, td); return (error); } mtx_lock(&np->n_mtx); @@ -591,7 +589,7 @@ nfs_open(struct vop_open_args *ap) np->n_directio_opens++; mtx_unlock(&np->n_mtx); } - vnode_create_vobject(vp, vattr.va_size, ap->a_td); + vnode_create_vobject(vp, vattr.va_size, td); return (0); } Index: sys/fs/deadfs/dead_vnops.c =================================================================== --- sys/fs/deadfs/dead_vnops.c (revision 199789) +++ sys/fs/deadfs/dead_vnops.c (working copy) @@ -121,7 +121,6 @@ dead_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct proc *a_p; } */ *ap; { Index: sys/fs/tmpfs/tmpfs_vnops.c =================================================================== --- sys/fs/tmpfs/tmpfs_vnops.c (revision 199789) +++ sys/fs/tmpfs/tmpfs_vnops.c (working copy) @@ -252,7 +252,7 @@ tmpfs_open(struct vop_open_args *v) error = EPERM; else { error = 0; - vnode_create_vobject(vp, node->tn_size, v->a_td); + vnode_create_vobject(vp, node->tn_size, curthread); } MPASS(VOP_ISLOCKED(vp)); Index: sys/fs/portalfs/portal_vnops.c =================================================================== --- sys/fs/portalfs/portal_vnops.c (revision 199789) +++ sys/fs/portalfs/portal_vnops.c (working copy) @@ -205,12 +205,11 @@ portal_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { struct socket *so = 0; struct portalnode *pt; - struct thread *td = ap->a_td; + struct thread *td = curthread; struct vnode *vp = ap->a_vp; struct uio auio; struct iovec aiov[2]; @@ -246,8 +245,7 @@ portal_open(ap) /* * Create a new socket. */ - error = socreate(AF_UNIX, &so, SOCK_STREAM, 0, ap->a_td->td_ucred, - ap->a_td); + error = socreate(AF_UNIX, &so, SOCK_STREAM, 0, ap->a_cred, td); if (error) goto bad; Index: sys/fs/hpfs/hpfs_vnops.c =================================================================== --- sys/fs/hpfs/hpfs_vnops.c (revision 199789) +++ sys/fs/hpfs/hpfs_vnops.c (working copy) @@ -726,7 +726,6 @@ hpfs_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { #ifdef HPFS_DEBUG Index: sys/fs/coda/coda_vnops.c =================================================================== --- sys/fs/coda/coda_vnops.c (revision 199789) +++ sys/fs/coda/coda_vnops.c (working copy) @@ -188,7 +188,6 @@ coda_open(struct vop_open_args *ap) struct cnode *cp = VTOC(*vpp); int flag = ap->a_mode & (~O_EXCL); struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; /* locals */ int error; struct vnode *vp; @@ -209,7 +208,7 @@ coda_open(struct vop_open_args *ap) return (0); } error = venus_open(vtomi((*vpp)), &cp->c_fid, flag, cred, - td->td_proc, &vp); + curproc, &vp); if (error) return (error); CODADEBUG(CODA_OPEN, myprintf(("open: vp %p result %d\n", vp, @@ -238,7 +237,7 @@ coda_open(struct vop_open_args *ap) * Open the cache file. */ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_OPEN(vp, flag, cred, td, NULL); + error = VOP_OPEN(vp, flag, cred, NULL); if (error) { VOP_UNLOCK(vp, 0); printf("coda_open: VOP_OPEN on container failed %d\n", error); @@ -351,7 +350,7 @@ coda_rdwr(struct vnode *vp, struct uio *uiop, enum opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); error = VOP_OPEN(vp, (rw == UIO_READ ? FREAD : FWRITE), cred, - td, NULL); + NULL); #ifdef CODA_VERBOSE printf("coda_rdwr: Internally Opening %p\n", vp); #endif @@ -1492,7 +1491,7 @@ coda_readdir(struct vop_readdir_args *ap) if (cp->c_ovp == NULL) { opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); - error = VOP_OPEN(vp, FREAD, cred, td, NULL); + error = VOP_OPEN(vp, FREAD, cred, NULL); printf("coda_readdir: Internally Opening %p\n", vp); if (error) { printf("coda_readdir: VOP_OPEN on container failed " Index: sys/fs/devfs/devfs_vnops.c =================================================================== --- sys/fs/devfs/devfs_vnops.c (revision 199789) +++ sys/fs/devfs/devfs_vnops.c (working copy) @@ -930,7 +930,7 @@ notfound: static int devfs_open(struct vop_open_args *ap) { - struct thread *td = ap->a_td; + struct thread *td = curthread; struct vnode *vp = ap->a_vp; struct cdev *dev = vp->v_rdev; struct file *fp = ap->a_fp; Index: sys/fs/ntfs/ntfs_vnops.c =================================================================== --- sys/fs/ntfs/ntfs_vnops.c (revision 199789) +++ sys/fs/ntfs/ntfs_vnops.c (working copy) @@ -429,7 +429,6 @@ ntfs_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { #ifdef NTFS_DEBUG @@ -439,7 +438,7 @@ ntfs_open(ap) printf("ntfs_open: %d\n",ip->i_number); #endif - vnode_create_vobject(ap->a_vp, VTOF(ap->a_vp)->f_size, ap->a_td); + vnode_create_vobject(ap->a_vp, VTOF(ap->a_vp)->f_size, curthread); /* * Files marked append-only must be opened for appending. Index: sys/fs/smbfs/smbfs_vnops.c =================================================================== --- sys/fs/smbfs/smbfs_vnops.c (revision 199789) +++ sys/fs/smbfs/smbfs_vnops.c (working copy) @@ -154,13 +154,13 @@ smbfs_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { struct vnode *vp = ap->a_vp; struct smbnode *np = VTOSMB(vp); struct smb_cred scred; struct vattr vattr; + struct thread *td = curthread; int mode = ap->a_mode; int error, accmode; @@ -174,7 +174,7 @@ smbfs_open(ap) return 0; } if (np->n_flag & NMODIFIED) { - if ((error = smbfs_vinvalbuf(vp, ap->a_td)) == EINTR) + if ((error = smbfs_vinvalbuf(vp, td)) == EINTR) return error; smbfs_attr_cacheremove(vp); error = VOP_GETATTR(vp, &vattr, ap->a_cred); @@ -186,7 +186,7 @@ smbfs_open(ap) if (error) return error; if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { - error = smbfs_vinvalbuf(vp, ap->a_td); + error = smbfs_vinvalbuf(vp, td); if (error == EINTR) return error; np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; @@ -203,7 +203,7 @@ smbfs_open(ap) accmode = SMB_SM_DENYNONE|SMB_AM_OPENREAD; if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0) accmode = SMB_SM_DENYNONE|SMB_AM_OPENRW; - smb_makescred(&scred, ap->a_td, ap->a_cred); + smb_makescred(&scred, td, ap->a_cred); error = smbfs_smb_open(np, accmode, &scred); if (error) { if (mode & FWRITE) @@ -215,7 +215,7 @@ smbfs_open(ap) } if (error == 0) { np->n_flag |= NOPEN; - vnode_create_vobject(ap->a_vp, vattr.va_size, ap->a_td); + vnode_create_vobject(ap->a_vp, vattr.va_size, td); } smbfs_attr_cacheremove(vp); return error; @@ -383,8 +383,7 @@ smbfs_setattr(ap) */ if ((np->n_flag & NOPEN) == 0) { if (vcp->vc_flags & SMBV_WIN95) { - error = VOP_OPEN(vp, FWRITE, ap->a_cred, td, - NULL); + error = VOP_OPEN(vp, FWRITE, ap->a_cred, NULL); if (!error) { /* error = smbfs_smb_setfattrNT(np, 0, mtime, atime, &scred); Index: sys/fs/smbfs/smbfs_io.c =================================================================== --- sys/fs/smbfs/smbfs_io.c (revision 199789) +++ sys/fs/smbfs/smbfs_io.c (working copy) @@ -591,7 +591,7 @@ smbfs_putpages(ap) #ifdef SMBFS_RWGENERIC td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ - VOP_OPEN(vp, FWRITE, cred, td, NULL); + VOP_OPEN(vp, FWRITE, cred, NULL); error = vop_stdputpages(ap); VOP_CLOSE(vp, FWRITE, cred, td); return error; @@ -609,7 +609,7 @@ smbfs_putpages(ap) td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ -/* VOP_OPEN(vp, FWRITE, cred, td, NULL);*/ +/* VOP_OPEN(vp, FWRITE, cred, NULL);*/ np = VTOSMB(vp); smp = VFSTOSMBFS(vp->v_mount); pages = ap->a_m; Index: sys/fs/cd9660/cd9660_vnops.c =================================================================== --- sys/fs/cd9660/cd9660_vnops.c (revision 199789) +++ sys/fs/cd9660/cd9660_vnops.c (working copy) @@ -164,7 +164,6 @@ cd9660_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; struct file *a_fp; } */ *ap; { @@ -174,7 +173,7 @@ cd9660_open(ap) if (vp->v_type == VCHR || vp->v_type == VBLK) return (EOPNOTSUPP); - vnode_create_vobject(vp, ip->i_size, ap->a_td); + vnode_create_vobject(vp, ip->i_size, curthread); return (0); } Index: sys/fs/fifofs/fifo_vnops.c =================================================================== --- sys/fs/fifofs/fifo_vnops.c (revision 199789) +++ sys/fs/fifofs/fifo_vnops.c (working copy) @@ -179,13 +179,12 @@ fifo_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; struct file *a_fp; } */ *ap; { struct vnode *vp = ap->a_vp; struct fifoinfo *fip; - struct thread *td = ap->a_td; + struct thread *td = curthread; struct ucred *cred = ap->a_cred; struct file *fp = ap->a_fp; struct socket *rso, *wso; Index: sys/fs/nwfs/nwfs_vnops.c =================================================================== --- sys/fs/nwfs/nwfs_vnops.c (revision 199789) +++ sys/fs/nwfs/nwfs_vnops.c (working copy) @@ -154,7 +154,6 @@ nwfs_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *td; } */ *ap; { struct vnode *vp = ap->a_vp; @@ -163,6 +162,7 @@ nwfs_open(ap) struct ncp_open_info no; struct nwmount *nmp = VTONWFS(vp); struct vattr vattr; + struct thread td = curthread; int error, nwm; NCPVNDEBUG("%s,%d\n", np->n_name, np->opened); @@ -172,7 +172,7 @@ nwfs_open(ap) } if (vp->v_type == VDIR) return 0; /* nothing to do now */ if (np->n_flag & NMODIFIED) { - if ((error = nwfs_vinvalbuf(vp, ap->a_td)) == EINTR) + if ((error = nwfs_vinvalbuf(vp, td)) == EINTR) return (error); np->n_atime = 0; error = VOP_GETATTR(vp, &vattr, ap->a_cred); @@ -182,7 +182,7 @@ nwfs_open(ap) error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) return (error); if (np->n_mtime != vattr.va_mtime.tv_sec) { - if ((error = nwfs_vinvalbuf(vp, ap->a_td)) == EINTR) + if ((error = nwfs_vinvalbuf(vp, td)) == EINTR) return (error); np->n_mtime = vattr.va_mtime.tv_sec; } @@ -195,13 +195,13 @@ nwfs_open(ap) if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0) nwm |= AR_WRITE; error = ncp_open_create_file_or_subdir(nmp, vp, 0, NULL, OC_MODE_OPEN, - 0, nwm, &no, ap->a_td, ap->a_cred); + 0, nwm, &no, td, ap->a_cred); if (error) { if (mode & FWRITE) return EACCES; nwm = AR_READ; error = ncp_open_create_file_or_subdir(nmp, vp, 0, NULL, OC_MODE_OPEN, 0, - nwm, &no, ap->a_td, ap->a_cred); + nwm, &no, td, ap->a_cred); } if (!error) { np->opened++; Index: sys/fs/nwfs/nwfs_io.c =================================================================== --- sys/fs/nwfs/nwfs_io.c (revision 199789) +++ sys/fs/nwfs/nwfs_io.c (working copy) @@ -527,7 +527,7 @@ nwfs_putpages(ap) #ifndef NWFS_RWCACHE td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ - VOP_OPEN(vp, FWRITE, cred, td, NULL); + VOP_OPEN(vp, FWRITE, cred, NULL); error = vop_stdputpages(ap); VOP_CLOSE(vp, FWRITE, cred, td); return error; @@ -544,7 +544,7 @@ nwfs_putpages(ap) td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ -/* VOP_OPEN(vp, FWRITE, cred, td, NULL);*/ +/* VOP_OPEN(vp, FWRITE, cred, NULL);*/ np = VTONW(vp); nmp = VFSTONWFS(vp->v_mount); pages = ap->a_m; Index: sys/fs/fdescfs/fdesc_vnops.c =================================================================== --- sys/fs/fdescfs/fdesc_vnops.c (revision 199789) +++ sys/fs/fdescfs/fdesc_vnops.c (working copy) @@ -359,7 +359,6 @@ fdesc_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { struct vnode *vp = ap->a_vp; @@ -375,7 +374,7 @@ fdesc_open(ap) * Other callers of vn_open or VOP_OPEN will simply report the * error. */ - ap->a_td->td_dupfd = VTOFDESC(vp)->fd_fd; /* XXX */ + curthread->td_dupfd = VTOFDESC(vp)->fd_fd; /* XXX */ return (ENODEV); } Index: sys/fs/msdosfs/msdosfs_vnops.c =================================================================== --- sys/fs/msdosfs/msdosfs_vnops.c (revision 199789) +++ sys/fs/msdosfs/msdosfs_vnops.c (working copy) @@ -213,12 +213,11 @@ msdosfs_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; struct file *a_fp; } */ *ap; { struct denode *dep = VTODE(ap->a_vp); - vnode_create_vobject(ap->a_vp, dep->de_FileSize, ap->a_td); + vnode_create_vobject(ap->a_vp, dep->de_FileSize, curthread); return 0; } Index: sys/fs/udf/udf_vnops.c =================================================================== --- sys/fs/udf/udf_vnops.c (revision 199789) +++ sys/fs/udf/udf_vnops.c (working copy) @@ -185,7 +185,7 @@ udf_open(struct vop_open_args *ap) { off_t fsize; fsize = le64toh(np->fentry->inf_len); - vnode_create_vobject(ap->a_vp, fsize, ap->a_td); + vnode_create_vobject(ap->a_vp, fsize, curthread); return 0; } Index: sys/vm/swap_pager.c =================================================================== --- sys/vm/swap_pager.c (revision 199789) +++ sys/vm/swap_pager.c (working copy) @@ -2675,7 +2675,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_lo error = mac_system_check_swapon(td->td_ucred, vp); if (error == 0) #endif - error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); + error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, NULL); (void) VOP_UNLOCK(vp, 0); if (error) return (error); Index: sys/compat/linux/linux_misc.c =================================================================== --- sys/compat/linux/linux_misc.c (revision 199789) +++ sys/compat/linux/linux_misc.c (working copy) @@ -306,7 +306,7 @@ linux_uselib(struct thread *td, struct linux_useli if (error) goto cleanup; #endif - error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); + error = VOP_OPEN(vp, FREAD, td->td_ucred, NULL); if (error) goto cleanup; Index: sys/i386/ibcs2/imgact_coff.c =================================================================== --- sys/i386/ibcs2/imgact_coff.c (revision 199789) +++ sys/i386/ibcs2/imgact_coff.c (working copy) @@ -204,7 +204,7 @@ coff_load_file(struct thread *td, char *name) if ((error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td)) != 0) goto fail; - if ((error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL)) != 0) + if ((error = VOP_OPEN(vp, FREAD, td->td_ucred, NULL)) != 0) goto fail; /* Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 199789) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) @@ -3912,7 +3912,6 @@ zfs_freebsd_open(ap) struct vnode *a_vp; int a_mode; struct ucred *a_cred; - struct thread *a_td; } */ *ap; { vnode_t *vp = ap->a_vp; @@ -3921,7 +3920,7 @@ zfs_freebsd_open(ap) error = zfs_open(&vp, ap->a_mode, ap->a_cred, NULL); if (error == 0) - vnode_create_vobject(vp, zp->z_phys->zp_size, ap->a_td); + vnode_create_vobject(vp, zp->z_phys->zp_size, curthread); return (error); }