diff options
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index aeeeee3e3a1d..2c25a25da6c6 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -190,7 +190,7 @@ static int vn_io_fault1(struct vnode *vp, struct uio *uio, int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp) { - struct thread *td = ndp->ni_cnd.cn_thread; + struct thread *td = curthread; return (vn_open_cred(ndp, flagp, cmode, 0, td->td_ucred, fp)); } @@ -230,7 +230,6 @@ vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, u_int vn_open_flags, { struct vnode *vp; struct mount *mp; - struct thread *td = ndp->ni_cnd.cn_thread; struct vattr vat; struct vattr *vap = &vat; int fmode, error; @@ -332,7 +331,7 @@ restart: return (error); vp = ndp->ni_vp; } - error = vn_open_vnode(vp, fmode, cred, td, fp); + error = vn_open_vnode(vp, fmode, cred, curthread, fp); if (first_open) { VI_LOCK(vp); vp->v_iflag &= ~VI_FOPENING; |