summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2007-05-31 11:51:53 +0000
committerkib <kib@FreeBSD.org>2007-05-31 11:51:53 +0000
commitf13486a2227b9165fce30aa40d12b728f327a909 (patch)
treed5e88e86417c996e0e901ce9a43de8d9ae3ad44e /sys/kern/vfs_vnops.c
parent7f276f0bff169823b786ea0a9bbdfe936361fcb4 (diff)
downloadFreeBSD-src-f13486a2227b9165fce30aa40d12b728f327a909.zip
FreeBSD-src-f13486a2227b9165fce30aa40d12b728f327a909.tar.gz
Revert UF_OPENING workaround for CURRENT.
Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation argument from being file descriptor index into the pointer to struct file. Proposed and reviewed by: jhb Reviewed by: daichi (unionfs) Approved by: re (kensmith)
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index c0f179c..019553d 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -84,13 +84,14 @@ struct fileops vnops = {
};
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 @@ vn_open(ndp, flagp, cmode, fdidx)
* 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 @@ restart:
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)
OpenPOWER on IntegriCloud