Index: coda/coda_vnops.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/coda/coda_vnops.c,v retrieving revision 1.70 diff -u -r1.70 coda_vnops.c --- coda/coda_vnops.c 13 Mar 2007 01:50:21 -0000 1.70 +++ coda/coda_vnops.c 6 Apr 2007 14:49:42 -0000 @@ -257,7 +257,7 @@ cp->c_inode = inode; /* Open the cache file. */ - error = VOP_OPEN(vp, flag, cred, td, -1); + error = VOP_OPEN(vp, flag, cred, td, NULL); if (error) { printf("coda_open: VOP_OPEN on container failed %d\n", error); return (error); @@ -410,7 +410,7 @@ opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); error = VOP_OPEN(vp, (rw == UIO_READ ? FREAD : FWRITE), - cred, td, -1); + cred, td, NULL); printf("coda_rdwr: Internally Opening %p\n", vp); if (error) { printf("coda_rdwr: VOP_OPEN on container failed %d\n", error); @@ -1525,7 +1525,7 @@ if (cp->c_ovp == NULL) { opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); - error = VOP_OPEN(vp, FREAD, cred, td, -1); + error = VOP_OPEN(vp, FREAD, cred, td, NULL); printf("coda_readdir: Internally Opening %p\n", vp); if (error) { printf("coda_readdir: VOP_OPEN on container failed %d\n", error); Index: compat/linux/linux_misc.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/compat/linux/linux_misc.c,v retrieving revision 1.208 diff -u -r1.208 linux_misc.c --- compat/linux/linux_misc.c 24 Feb 2007 16:49:24 -0000 1.208 +++ compat/linux/linux_misc.c 6 Apr 2007 14:49:42 -0000 @@ -305,7 +305,7 @@ if (error) goto cleanup; #endif - error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); if (error) goto cleanup; @@ -1451,6 +1451,7 @@ int linux_gettid(struct thread *td, struct linux_gettid_args *args) { + #ifdef DEBUG if (ldebug(gettid)) printf(ARGS(gettid, "")); Index: compat/ndis/subr_ndis.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/compat/ndis/subr_ndis.c,v retrieving revision 1.106 diff -u -r1.106 subr_ndis.c --- compat/ndis/subr_ndis.c 20 Jun 2006 21:31:38 -0000 1.106 +++ compat/ndis/subr_ndis.c 6 Apr 2007 14:49:42 -0000 @@ -3008,7 +3008,7 @@ NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, path, td); flags = FREAD; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) { *status = NDIS_STATUS_FILE_NOT_FOUND; ExFreePool(fh); Index: dev/md/md.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/dev/md/md.c,v retrieving revision 1.167 diff -u -r1.167 md.c --- dev/md/md.c 14 Dec 2006 11:34:07 -0000 1.167 +++ dev/md/md.c 6 Apr 2007 14:49:50 -0000 @@ -913,7 +913,7 @@ if ((mdio->md_options & MD_READONLY) != 0) flags &= ~FWRITE; NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, sc->file, td); - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error != 0) return (error); vfslocked = NDHASGIANT(&nd); Index: fs/devfs/devfs_vnops.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/fs/devfs/devfs_vnops.c,v retrieving revision 1.143 diff -u -r1.143 devfs_vnops.c --- fs/devfs/devfs_vnops.c 4 Apr 2007 09:11:32 -0000 1.143 +++ fs/devfs/devfs_vnops.c 6 Apr 2007 14:49:55 -0000 @@ -734,7 +734,7 @@ struct thread *td = ap->a_td; struct vnode *vp = ap->a_vp; struct cdev *dev = vp->v_rdev; - struct file *fp; + struct file *fp = ap->a_fp; int error; struct cdevsw *dsw; @@ -761,13 +761,13 @@ if(!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); if (dsw->d_fdopen != NULL) - error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fdidx); + error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fp); else error = dsw->d_open(dev, ap->a_mode, S_IFCHR, td); PICKUP_GIANT(); } else { if (dsw->d_fdopen != NULL) - error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fdidx); + error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fp); else error = dsw->d_open(dev, ap->a_mode, S_IFCHR, td); } @@ -780,19 +780,12 @@ return (error); #if 0 /* /dev/console */ - KASSERT(ap->a_fdidx >= 0, + KASSERT(ap->a_fp != NULL, ("Could not vnode bypass device on fd %d", ap->a_fdidx)); #else - if(ap->a_fdidx < 0) + if(ap->a_fp == NULL) return (error); #endif - /* - * This is a pretty disgustingly long chain, but I am not - * sure there is any better way. Passing the fdidx into - * VOP_OPEN() offers us more information than just passing - * the file *. - */ - fp = ap->a_td->td_proc->p_fd->fd_ofiles[ap->a_fdidx]; FILE_LOCK(fp); KASSERT(fp->f_ops == &badfileops, ("Could not vnode bypass device on fdops %p", fp->f_ops)); Index: fs/fifofs/fifo_vnops.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/fs/fifofs/fifo_vnops.c,v retrieving revision 1.136 diff -u -r1.136 fifo_vnops.c --- fs/fifofs/fifo_vnops.c 4 Apr 2007 09:11:32 -0000 1.136 +++ fs/fifofs/fifo_vnops.c 6 Apr 2007 14:49:55 -0000 @@ -175,12 +175,12 @@ struct fifoinfo *fip; struct thread *td = ap->a_td; struct ucred *cred = ap->a_cred; + struct file *fp = ap->a_fp; struct socket *rso, *wso; - struct file *fp; int error; ASSERT_VOP_LOCKED(vp, "fifo_open"); - if (ap->a_fdidx < 0) + if (ap->a_fp == NULL) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, M_WAITOK); @@ -293,8 +293,7 @@ } } mtx_unlock(&fifo_mtx); - KASSERT(ap->a_fdidx >= 0, ("can't fifo/vnode bypass %d", ap->a_fdidx)); - fp = ap->a_td->td_proc->p_fd->fd_ofiles[ap->a_fdidx]; + KASSERT(fp != NULL, ("can't fifo/vnode bypass")); FILE_LOCK(fp); KASSERT(fp->f_ops == &badfileops, ("not badfileops in fifo_open")); fp->f_data = fip; Index: fs/smbfs/smbfs_vnops.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/fs/smbfs/smbfs_vnops.c,v retrieving revision 1.64 diff -u -r1.64 smbfs_vnops.c --- fs/smbfs/smbfs_vnops.c 6 Nov 2006 13:41:57 -0000 1.64 +++ fs/smbfs/smbfs_vnops.c 6 Apr 2007 14:49:55 -0000 @@ -385,7 +385,7 @@ */ if ((np->n_flag & NOPEN) == 0) { if (vcp->vc_flags & SMBV_WIN95) { - error = VOP_OPEN(vp, FWRITE, ap->a_cred, ap->a_td, -1); + error = VOP_OPEN(vp, FWRITE, ap->a_cred, ap->a_td, NULL); if (!error) { /* error = smbfs_smb_setfattrNT(np, 0, mtime, atime, &scred); VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td);*/ Index: fs/unionfs/union.h =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/fs/unionfs/union.h,v retrieving revision 1.33 diff -u -r1.33 union.h --- fs/unionfs/union.h 2 Dec 2006 19:35:56 -0000 1.33 +++ fs/unionfs/union.h 6 Apr 2007 14:49:55 -0000 @@ -64,7 +64,6 @@ int uns_lower_opencnt; /* open count of lower */ int uns_upper_opencnt; /* open count of upper */ int uns_lower_openmode; /* open mode of lower */ - int uns_lower_fdidx; /* open fdidx of lower */ int uns_readdir_status; /* read status of readdir */ }; Index: fs/unionfs/union_subr.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/fs/unionfs/union_subr.c,v retrieving revision 1.91 diff -u -r1.91 union_subr.c --- fs/unionfs/union_subr.c 4 Apr 2007 09:11:32 -0000 1.91 +++ fs/unionfs/union_subr.c 6 Apr 2007 14:49:55 -0000 @@ -913,7 +913,7 @@ 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, -1)) != 0) { + if ((error = VOP_OPEN(vp, fmode, cred, td, NULL)) != 0) { vput(vp); goto unionfs_vn_create_on_upper_free_out1; } @@ -1049,7 +1049,7 @@ } if (docopy != 0) { - error = VOP_OPEN(lvp, FREAD, cred, td, -1); + error = VOP_OPEN(lvp, FREAD, cred, td, NULL); if (error == 0) { error = unionfs_copyfile_core(lvp, uvp, cred, td); VOP_CLOSE(lvp, FREAD, cred, td); @@ -1110,7 +1110,7 @@ return (0); /* open vnode */ - if ((error = VOP_OPEN(vp, FREAD, cred, td, -1)) != 0) + if ((error = VOP_OPEN(vp, FREAD, cred, td, NULL)) != 0) return (error); uio.uio_rw = UIO_READ; Index: fs/unionfs/union_vnops.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/fs/unionfs/union_vnops.c,v retrieving revision 1.140 diff -u -r1.140 union_vnops.c --- fs/unionfs/union_vnops.c 15 Feb 2007 22:08:33 -0000 1.140 +++ fs/unionfs/union_vnops.c 6 Apr 2007 14:49:55 -0000 @@ -475,13 +475,13 @@ targetvp = uvp; } - error = VOP_OPEN(targetvp, ap->a_mode, cred, td, ap->a_fdidx); + error = VOP_OPEN(targetvp, ap->a_mode, cred, td, 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, -1); + error = VOP_OPEN(lvp, FREAD, cred, td, NULL); if (error != 0) { VOP_CLOSE(uvp, ap->a_mode, cred, td); goto unionfs_open_abort; @@ -493,7 +493,6 @@ } else { unsp->uns_lower_opencnt++; unsp->uns_lower_openmode = ap->a_mode; - unsp->uns_lower_fdidx = ap->a_fdidx; } ap->a_vp->v_object = targetvp->v_object; } @@ -1852,7 +1851,8 @@ unionfs_get_node_status(unp, td, &unsp); if (unsp->uns_lower_opencnt > 0) { /* try reopen the vnode */ - error = VOP_OPEN(uvp, unsp->uns_lower_openmode, td->td_ucred, td, unsp->uns_lower_fdidx); + error = VOP_OPEN(uvp, unsp->uns_lower_openmode, + td->td_ucred, td, NULL); if (error) goto unionfs_advlock_abort; unsp->uns_upper_opencnt++; Index: i386/ibcs2/imgact_coff.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/i386/ibcs2/imgact_coff.c,v retrieving revision 1.66 diff -u -r1.66 imgact_coff.c --- i386/ibcs2/imgact_coff.c 10 Jul 2006 17:59:26 -0000 1.66 +++ i386/ibcs2/imgact_coff.c 6 Apr 2007 14:49:58 -0000 @@ -204,7 +204,7 @@ if ((error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td)) != 0) goto fail; - if ((error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1)) != 0) + if ((error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL)) != 0) goto fail; /* Index: kern/kern_acct.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_acct.c,v retrieving revision 1.88 diff -u -r1.88 kern_acct.c --- kern/kern_acct.c 9 Mar 2007 23:29:31 -0000 1.88 +++ kern/kern_acct.c 6 Apr 2007 14:49:59 -0000 @@ -203,7 +203,7 @@ NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE | AUDITVNODE1, UIO_USERSPACE, uap->path, td); flags = FWRITE | O_APPEND; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) return (error); vfslocked = NDHASGIANT(&nd); Index: kern/kern_conf.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_conf.c,v retrieving revision 1.201 diff -u -r1.201 kern_conf.c --- kern/kern_conf.c 2 Feb 2007 22:27:45 -0000 1.201 +++ kern/kern_conf.c 6 Apr 2007 14:50:00 -0000 @@ -264,13 +264,13 @@ } static int -giant_fdopen(struct cdev *dev, int oflags, struct thread *td, int fdidx) +giant_fdopen(struct cdev *dev, int oflags, struct thread *td, struct file *fp) { int retval; mtx_lock(&Giant); retval = dev->si_devsw->d_gianttrick-> - d_fdopen(dev, oflags, td, fdidx); + d_fdopen(dev, oflags, td, fp); mtx_unlock(&Giant); return (retval); } Index: kern/kern_descrip.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.307 diff -u -r1.307 kern_descrip.c --- kern/kern_descrip.c 4 Apr 2007 09:11:32 -0000 1.307 +++ kern/kern_descrip.c 6 Apr 2007 14:50:00 -0000 @@ -1838,7 +1838,7 @@ NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, "/dev/null", td); flags = FREAD | FWRITE; - error = vn_open(&nd, &flags, 0, fd); + error = vn_open(&nd, &flags, 0, fp); if (error != 0) { /* * Someone may have closed the entry in the Index: kern/kern_exec.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_exec.c,v retrieving revision 1.302 diff -u -r1.302 kern_exec.c --- kern/kern_exec.c 25 Mar 2007 10:05:44 -0000 1.302 +++ kern/kern_exec.c 6 Apr 2007 14:50:00 -0000 @@ -1233,7 +1233,7 @@ * Call filesystem specific open routine (which does nothing in the * general case). */ - error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, NULL); return (error); } Index: kern/kern_ktrace.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_ktrace.c,v retrieving revision 1.117 diff -u -r1.117 kern_ktrace.c --- kern/kern_ktrace.c 5 Mar 2007 13:10:57 -0000 1.117 +++ kern/kern_ktrace.c 6 Apr 2007 14:50:00 -0000 @@ -596,7 +596,7 @@ NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_USERSPACE, uap->fname, td); flags = FREAD | FWRITE | O_NOFOLLOW; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) { ktrace_exit(td); return (error); Index: kern/kern_linker.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_linker.c,v retrieving revision 1.147 diff -u -r1.147 kern_linker.c --- kern/kern_linker.c 4 Mar 2007 22:36:46 -0000 1.147 +++ kern/kern_linker.c 6 Apr 2007 14:50:00 -0000 @@ -1515,7 +1515,7 @@ */ NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, result, td); flags = FREAD; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error == 0) { vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1566,7 +1566,7 @@ NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, pathbuf, td); flags = FREAD; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) goto bad; vfslocked = NDHASGIANT(&nd); Index: kern/kern_sig.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/kern_sig.c,v retrieving revision 1.342 diff -u -r1.342 kern_sig.c --- kern/kern_sig.c 21 Mar 2007 21:20:50 -0000 1.342 +++ kern/kern_sig.c 6 Apr 2007 14:50:00 -0000 @@ -3068,7 +3068,7 @@ return (EINVAL); NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, name, td); flags = O_CREAT | FWRITE | O_NOFOLLOW; - error = vn_open(&nd, &flags, S_IRUSR | S_IWUSR, -1); + error = vn_open(&nd, &flags, S_IRUSR | S_IWUSR, NULL); free(name, M_TEMP); if (error) return (error); Index: kern/link_elf.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/link_elf.c,v retrieving revision 1.92 diff -u -r1.92 link_elf.c --- kern/link_elf.c 26 Feb 2007 16:48:14 -0000 1.92 +++ kern/link_elf.c 6 Apr 2007 14:50:00 -0000 @@ -566,7 +566,7 @@ NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, filename, td); flags = FREAD; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) return error; vfslocked = NDHASGIANT(&nd); Index: kern/link_elf_obj.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/link_elf_obj.c,v retrieving revision 1.94 diff -u -r1.94 link_elf_obj.c --- kern/link_elf_obj.c 30 Nov 2006 10:50:29 -0000 1.94 +++ kern/link_elf_obj.c 6 Apr 2007 14:50:00 -0000 @@ -404,7 +404,7 @@ NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, filename, td); flags = FREAD; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) return error; vfslocked = NDHASGIANT(&nd); Index: kern/tty_cons.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/tty_cons.c,v retrieving revision 1.138 diff -u -r1.138 tty_cons.c --- kern/tty_cons.c 6 Nov 2006 13:42:01 -0000 1.138 +++ kern/tty_cons.c 6 Apr 2007 14:50:00 -0000 @@ -407,7 +407,7 @@ } snprintf(path, sizeof(path), "/dev/%s", cnd->cnd_cn->cn_name); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); - error = vn_open(&nd, &openflag, 0, -1); + error = vn_open(&nd, &openflag, 0, NULL); if (error == 0) { NDFREE(&nd, NDF_ONLY_PNBUF); VOP_UNLOCK(nd.ni_vp, 0, td); Index: kern/vfs_syscalls.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.436 diff -u -r1.436 vfs_syscalls.c --- kern/vfs_syscalls.c 4 Apr 2007 09:11:33 -0000 1.436 +++ kern/vfs_syscalls.c 6 Apr 2007 14:50:00 -0000 @@ -983,7 +983,7 @@ cmode = ((mode &~ fdp->fd_cmask) & ALLPERMS) &~ S_ISTXT; NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE1 | MPSAFE, pathseg, path, td); td->td_dupfd = -1; /* XXX check for fdopen */ - error = vn_open(&nd, &flags, cmode, indx); + error = vn_open(&nd, &flags, cmode, fp); if (error) { /* * If the vn_open replaced the method vector, something @@ -4084,7 +4084,7 @@ if (error) goto bad; } - error = VOP_OPEN(vp, fmode, td->td_ucred, td, -1); + error = VOP_OPEN(vp, fmode, td->td_ucred, td, NULL); if (error) goto bad; Index: kern/vfs_vnops.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/vfs_vnops.c,v retrieving revision 1.248 diff -u -r1.248 vfs_vnops.c --- kern/vfs_vnops.c 12 Feb 2007 22:53:01 -0000 1.248 +++ kern/vfs_vnops.c 6 Apr 2007 14:50:00 -0000 @@ -84,13 +84,14 @@ }; int -vn_open(ndp, flagp, cmode, fdidx) +vn_open(ndp, flagp, cmode, fp) struct nameidata *ndp; - int *flagp, cmode, fdidx; + int *flagp, cmode; + struct file *fp; { struct thread *td = ndp->ni_cnd.cn_thread; - return (vn_open_cred(ndp, flagp, cmode, td->td_ucred, fdidx)); + return (vn_open_cred(ndp, flagp, cmode, td->td_ucred, fp)); } /* @@ -101,11 +102,11 @@ * due to the NDINIT being done elsewhere. */ int -vn_open_cred(ndp, flagp, cmode, cred, fdidx) +vn_open_cred(ndp, flagp, cmode, cred, fp) struct nameidata *ndp; int *flagp, cmode; struct ucred *cred; - int fdidx; + struct file *fp; { struct vnode *vp; struct mount *mp; @@ -228,7 +229,7 @@ goto bad; } } - if ((error = VOP_OPEN(vp, fmode, cred, td, fdidx)) != 0) + if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) goto bad; if (fmode & FWRITE) Index: kern/vnode_if.src =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/kern/vnode_if.src,v retrieving revision 1.85 diff -u -r1.85 vnode_if.src --- kern/vnode_if.src 15 Feb 2007 22:08:35 -0000 1.85 +++ kern/vnode_if.src 6 Apr 2007 14:50:00 -0000 @@ -130,7 +130,7 @@ IN int mode; IN struct ucred *cred; IN struct thread *td; - IN int fdidx; + IN struct file *fp; }; Index: sys/conf.h =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/sys/conf.h,v retrieving revision 1.231 diff -u -r1.231 conf.h --- sys/conf.h 2 Feb 2007 22:27:45 -0000 1.231 +++ sys/conf.h 6 Apr 2007 14:50:17 -0000 @@ -50,6 +50,7 @@ struct snapdata; struct devfs_dirent; struct cdevsw; +struct file; struct cdev { struct cdev_priv *si_priv; @@ -126,7 +127,7 @@ typedef struct thread d_thread_t; typedef int d_open_t(struct cdev *dev, int oflags, int devtype, struct thread *td); -typedef int d_fdopen_t(struct cdev *dev, int oflags, struct thread *td, int fdidx); +typedef int d_fdopen_t(struct cdev *dev, int oflags, struct thread *td, struct file *fp); typedef int d_close_t(struct cdev *dev, int fflag, int devtype, struct thread *td); typedef void d_strategy_t(struct bio *bp); typedef int d_ioctl_t(struct cdev *dev, u_long cmd, caddr_t data, Index: sys/vnode.h =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/sys/vnode.h,v retrieving revision 1.323 diff -u -r1.323 vnode.h --- sys/vnode.h 31 Mar 2007 23:57:17 -0000 1.323 +++ sys/vnode.h 6 Apr 2007 14:50:17 -0000 @@ -613,9 +613,9 @@ int vn_isdisk(struct vnode *vp, int *errp); int _vn_lock(struct vnode *vp, int flags, struct thread *td, char *file, int line); #define vn_lock(vp, flags, td) _vn_lock(vp, flags, td, __FILE__, __LINE__) -int vn_open(struct nameidata *ndp, int *flagp, int cmode, int fdidx); +int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp); int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, - struct ucred *cred, int fdidx); + struct ucred *cred, struct file *fp); int vn_pollrecord(struct vnode *vp, struct thread *p, int events); int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, enum uio_seg segflg, int ioflg, Index: ufs/ufs/ufs_quota.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/ufs/ufs/ufs_quota.c,v retrieving revision 1.93 diff -u -r1.93 ufs_quota.c --- ufs/ufs/ufs_quota.c 14 Mar 2007 08:54:07 -0000 1.93 +++ ufs/ufs/ufs_quota.c 6 Apr 2007 14:50:17 -0000 @@ -524,7 +524,7 @@ NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_USERSPACE, fname, td); flags = FREAD | FWRITE; - error = vn_open(&nd, &flags, 0, -1); + error = vn_open(&nd, &flags, 0, NULL); if (error) return (error); vfslocked = NDHASGIANT(&nd); Index: vm/swap_pager.c =================================================================== RCS file: /usr/local/arch/ncvs/src/sys/vm/swap_pager.c,v retrieving revision 1.288 diff -u -r1.288 swap_pager.c --- vm/swap_pager.c 27 Feb 2007 17:23:27 -0000 1.288 +++ vm/swap_pager.c 6 Apr 2007 14:50:18 -0000 @@ -2533,7 +2533,7 @@ error = mac_check_system_swapon(td->td_ucred, vp); if (error == 0) #endif - error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, -1); + error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); (void) VOP_UNLOCK(vp, 0, td); if (error) return (error);