diff options
Diffstat (limited to 'sys')
28 files changed, 43 insertions, 42 deletions
diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c index ac52818..1c061b1 100644 --- a/sys/coda/coda_fbsd.c +++ b/sys/coda/coda_fbsd.c @@ -127,7 +127,7 @@ coda_fbsd_getpages(v) if (cfvp == NULL) { opened_internally = 1; - error = VOP_OPEN(vp, FREAD, cred, p); + error = VOP_OPEN(vp, FREAD, cred, p, -1); printf("coda_getp: Internally Opening %p\n", vp); if (error) { diff --git a/sys/coda/coda_vnops.c b/sys/coda/coda_vnops.c index 20ee42d..8e44455 100644 --- a/sys/coda/coda_vnops.c +++ b/sys/coda/coda_vnops.c @@ -296,7 +296,7 @@ coda_open(v) cp->c_inode = inode; /* Open the cache file. */ - error = VOP_OPEN(vp, flag, cred, td); + error = VOP_OPEN(vp, flag, cred, td, -1); if (error) { printf("coda_open: VOP_OPEN on container failed %d\n", error); return (error); @@ -467,7 +467,7 @@ coda_rdwr(vp, uiop, rw, ioflag, cred, td) opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); error = VOP_OPEN(vp, (rw == UIO_READ ? FREAD : FWRITE), - cred, td); + cred, td, -1); printf("coda_rdwr: Internally Opening %p\n", vp); if (error) { printf("coda_rdwr: VOP_OPEN on container failed %d\n", error); @@ -1646,7 +1646,7 @@ coda_readdir(v) if (cp->c_ovp == NULL) { opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); - error = VOP_OPEN(vp, FREAD, cred, td); + error = VOP_OPEN(vp, FREAD, cred, td, -1); printf("coda_readdir: Internally Opening %p\n", vp); if (error) { printf("coda_readdir: VOP_OPEN on container failed %d\n", error); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 8ccc5cf..a2b57bc 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -310,7 +310,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) if (error) goto cleanup; #endif - error = VOP_OPEN(vp, FREAD, td->td_ucred, td); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); if (error) goto cleanup; diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c index 29a88e1..d58bf26 100644 --- a/sys/dev/raidframe/rf_freebsdkintf.c +++ b/sys/dev/raidframe/rf_freebsdkintf.c @@ -2333,7 +2333,7 @@ rf_find_raid_components() vref(vp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(vp, FREAD, td->td_ucred, td); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); VOP_UNLOCK(vp, 0, td); if (error) { vput(vp); @@ -2364,7 +2364,7 @@ rf_find_raid_components() vref(vp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(vp, FREAD, td->td_ucred, td); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); VOP_UNLOCK(vp, 0, td); if (error) { continue; @@ -2419,7 +2419,7 @@ rf_search_label(dev_t dev, struct disklabel *label, RF_AutoConfig_t **ac_list) vref(vp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(vp, FREAD, td->td_ucred, td); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); VOP_UNLOCK(vp, 0, td); if (error) { /* Whatever... */ diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index c076d08..42455f0 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -154,7 +154,7 @@ iso_mountroot(mp, td) args.flags = ISOFSMNT_ROOT; vn_lock(rootvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(rootvp, FREAD, FSCRED, td); + error = VOP_OPEN(rootvp, FREAD, FSCRED, td, -1); VOP_UNLOCK(rootvp, 0, td); if (error) return error; @@ -304,7 +304,7 @@ iso_mountfs(devvp, mp, td, argp) return (error); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, FREAD, FSCRED, td); + error = VOP_OPEN(devvp, FREAD, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return error; diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index ac52818..1c061b1 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -127,7 +127,7 @@ coda_fbsd_getpages(v) if (cfvp == NULL) { opened_internally = 1; - error = VOP_OPEN(vp, FREAD, cred, p); + error = VOP_OPEN(vp, FREAD, cred, p, -1); printf("coda_getp: Internally Opening %p\n", vp); if (error) { diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 20ee42d..8e44455 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -296,7 +296,7 @@ coda_open(v) cp->c_inode = inode; /* Open the cache file. */ - error = VOP_OPEN(vp, flag, cred, td); + error = VOP_OPEN(vp, flag, cred, td, -1); if (error) { printf("coda_open: VOP_OPEN on container failed %d\n", error); return (error); @@ -467,7 +467,7 @@ coda_rdwr(vp, uiop, rw, ioflag, cred, td) opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); error = VOP_OPEN(vp, (rw == UIO_READ ? FREAD : FWRITE), - cred, td); + cred, td, -1); printf("coda_rdwr: Internally Opening %p\n", vp); if (error) { printf("coda_rdwr: VOP_OPEN on container failed %d\n", error); @@ -1646,7 +1646,7 @@ coda_readdir(v) if (cp->c_ovp == NULL) { opened_internally = 1; MARK_INT_GEN(CODA_OPEN_STATS); - error = VOP_OPEN(vp, FREAD, cred, td); + error = VOP_OPEN(vp, FREAD, cred, td, -1); printf("coda_readdir: Internally Opening %p\n", vp); if (error) { printf("coda_readdir: VOP_OPEN on container failed %d\n", error); diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index a838909..86e8bc6 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -243,7 +243,7 @@ hpfs_mountfs(devvp, mp, argsp, td) ronly = (mp->mnt_flag & MNT_RDONLY) != 0; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return (error); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 5e5713d..22d518e 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -324,9 +324,9 @@ mountmsdosfs(devvp, mp, td, argp) * we don't VOP_OPEN the device again in that case. */ #ifdef notyet - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1); #else - error = VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, td, -1); #endif VOP_UNLOCK(devvp, 0, td); if (error) diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index f01c6ff..cd5e062 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -299,7 +299,7 @@ ntfs_mountfs(devvp, mp, argsp, td) ronly = (mp->mnt_flag & MNT_RDONLY) != 0; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return (error); diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 46f5cf7..ddd2b1b 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -528,7 +528,7 @@ nwfs_putpages(ap) #ifndef NWFS_RWCACHE td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ - VOP_OPEN(vp, FWRITE, cred, td); + VOP_OPEN(vp, FWRITE, cred, td, -1); error = vop_stdputpages(ap); VOP_CLOSE(vp, FWRITE, cred, td); return error; @@ -545,7 +545,7 @@ nwfs_putpages(ap) td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ -/* VOP_OPEN(vp, FWRITE, cred, td);*/ +/* VOP_OPEN(vp, FWRITE, cred, td, -1);*/ np = VTONW(vp); nmp = VFSTONWFS(vp->v_mount); pages = ap->a_m; diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index fb56649..c5de3a6 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -594,7 +594,7 @@ smbfs_putpages(ap) #ifdef SMBFS_RWGENERIC td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ - VOP_OPEN(vp, FWRITE, cred, td); + VOP_OPEN(vp, FWRITE, cred, td, -1); error = vop_stdputpages(ap); VOP_CLOSE(vp, FWRITE, cred, td); return error; @@ -612,7 +612,7 @@ smbfs_putpages(ap) td = curthread; /* XXX */ cred = td->td_ucred; /* XXX */ -/* VOP_OPEN(vp, FWRITE, cred, td);*/ +/* VOP_OPEN(vp, FWRITE, cred, td, -1);*/ np = VTOSMB(vp); smp = VFSTOSMBFS(vp->v_mount); pages = ap->a_m; diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index 41918b9..826706d 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -380,7 +380,7 @@ smbfs_setattr(ap) */ if ((np->n_flag & NOPEN) == 0) { if (vcp->vc_flags & SMBV_WIN95) { - error = VOP_OPEN(vp, FWRITE, ap->a_cred, ap->a_td); + error = VOP_OPEN(vp, FWRITE, ap->a_cred, ap->a_td, -1); if (!error) { /* error = smbfs_smb_setfattrNT(np, 0, mtime, atime, &scred); VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td);*/ diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 2810bb8..f9cf3de 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -305,7 +305,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) { return (error); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, FREAD, FSCRED, td); + error = VOP_OPEN(devvp, FREAD, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return error; diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 94460cf..896a5b9 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -784,7 +784,7 @@ union_copyup(un, docopy, cred, td) * from VOP_CLOSE() */ vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(lvp, FREAD, cred, td); + error = VOP_OPEN(lvp, FREAD, cred, td, -1); if (error == 0 && vn_canvmio(lvp) == TRUE) error = vfs_object_create(lvp, td, cred); if (error == 0) { @@ -815,7 +815,7 @@ union_copyup(un, docopy, cred, td) for (i = 0; i < un->un_openl; i++) { (void) VOP_CLOSE(lvp, FREAD, cred, td); - (void) VOP_OPEN(uvp, FREAD, cred, td); + (void) VOP_OPEN(uvp, FREAD, cred, td, -1); } if (un->un_openl) { if (vn_canvmio(uvp) == TRUE) @@ -1130,7 +1130,7 @@ union_vn_create(vpp, un, td) if (error) return (error); - error = VOP_OPEN(vp, fmode, cred, td); + error = VOP_OPEN(vp, fmode, cred, td, -1); if (error == 0 && vn_canvmio(vp) == TRUE) error = vfs_object_create(vp, td, cred); if (error) { @@ -1340,7 +1340,7 @@ union_dircheck(struct thread *td, struct vnode **vp, struct file *fp) } if (lvp != NULLVP) { - error = VOP_OPEN(lvp, FREAD, fp->f_cred, td); + error = VOP_OPEN(lvp, FREAD, fp->f_cred, td, -1); if (error == 0 && vn_canvmio(lvp) == TRUE) error = vfs_object_create(lvp, td, fp->f_cred); if (error) { diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 401567d..356b861 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -776,7 +776,7 @@ union_open(ap) */ if (error == 0) - error = VOP_OPEN(tvp, mode, cred, td); + error = VOP_OPEN(tvp, mode, cred, td, -1); /* * This is absolutely necessary or UFS will blow up. diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index dde2d38..b5369f4 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -649,7 +649,7 @@ ext2_mountfs(devvp, mp, td) ronly = (mp->mnt_flag & MNT_RDONLY) != 0; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return (error); diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index dde2d38..b5369f4 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -649,7 +649,7 @@ ext2_mountfs(devvp, mp, td) ronly = (mp->mnt_flag & MNT_RDONLY) != 0; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return (error); diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c index ec658c1..a5080ff 100644 --- a/sys/i386/ibcs2/imgact_coff.c +++ b/sys/i386/ibcs2/imgact_coff.c @@ -200,7 +200,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)) != 0) + if ((error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1)) != 0) goto fail; /* diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index c076d08..42455f0 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -154,7 +154,7 @@ iso_mountroot(mp, td) args.flags = ISOFSMNT_ROOT; vn_lock(rootvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(rootvp, FREAD, FSCRED, td); + error = VOP_OPEN(rootvp, FREAD, FSCRED, td, -1); VOP_UNLOCK(rootvp, 0, td); if (error) return error; @@ -304,7 +304,7 @@ iso_mountfs(devvp, mp, td, argp) return (error); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, FREAD, FSCRED, td); + error = VOP_OPEN(devvp, FREAD, FSCRED, td, -1); VOP_UNLOCK(devvp, 0, td); if (error) return error; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index ed97677..8ff2dda 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1142,7 +1142,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); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td, -1); return (error); } diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 5d8b2d3..f7afcb5 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3621,7 +3621,7 @@ fhopen(td, uap) if (error) goto bad; } - error = VOP_OPEN(vp, fmode, td->td_ucred, td); + error = VOP_OPEN(vp, fmode, td->td_ucred, td, -1); if (error) goto bad; /* diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5d8b2d3..f7afcb5 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3621,7 +3621,7 @@ fhopen(td, uap) if (error) goto bad; } - error = VOP_OPEN(vp, fmode, td->td_ucred, td); + error = VOP_OPEN(vp, fmode, td->td_ucred, td, -1); if (error) goto bad; /* diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 2b53323..216a577 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -234,7 +234,7 @@ restart: vp->v_cachedfs = vap->va_fsid; vp->v_cachedid = vap->va_fileid; } - if ((error = VOP_OPEN(vp, fmode, cred, td)) != 0) + if ((error = VOP_OPEN(vp, fmode, cred, td, -1)) != 0) goto bad; /* * Make sure that a VM object is created for VMIO support. diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 26e8e32..7baef0d 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -135,6 +135,7 @@ vop_open { IN int mode; IN struct ucred *cred; IN struct thread *td; + IN int fd; }; # diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index f74affb..7a41015 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -610,9 +610,9 @@ ffs_mountfs(devvp, mp, td) * XXX: start to avoid getting trashed later on. */ #ifdef notyet - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1); #else - error = VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, td, -1); #endif VOP_UNLOCK(devvp, 0, td); if (error) diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index b916d2d..8819698 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -324,7 +324,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp, { int error; - error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td); + error = VOP_OPEN(vp, FREAD|FWRITE, td->td_ucred, td, -1); if (error) { printf("ufs_extattr_enable_with_open.VOP_OPEN(): failed " "with %d\n", error); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 7168f84..011833c 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2493,7 +2493,7 @@ swaponvp(td, vp, dev, nblks) error = mac_check_system_swapon(td->td_ucred, vp); if (error == 0) #endif - error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td); + error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, -1); (void) VOP_UNLOCK(vp, 0, td); if (error) return (error); |