summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/exec_script.c4
-rw-r--r--sys/kern/kern_descrip.c4
-rw-r--r--sys/kern/spec_vnops.c16
-rw-r--r--sys/kern/tty.c4
-rw-r--r--sys/kern/tty_tty.c10
-rw-r--r--sys/kern/vfs_cache.c6
-rw-r--r--sys/kern/vfs_getcwd.c8
-rw-r--r--sys/kern/vfs_lookup.c10
-rw-r--r--sys/kern/vfs_subr.c6
-rw-r--r--sys/kern/vfs_syscalls.c30
-rw-r--r--sys/kern/vfs_vnops.c14
11 files changed, 53 insertions, 59 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index 4a659c80867..0bfaea0aee0 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_script.c,v 1.43 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: exec_script.c,v 1.44 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */
/*
@@ -158,7 +158,7 @@ check_shell:
* close all open fd's when they start. That kills this
* method of implementing "safe" set-id and x-only scripts.
*/
- vn_lock(scriptvp, LK_EXCLUSIVE|LK_RETRY, p);
+ vn_lock(scriptvp, LK_EXCLUSIVE|LK_RETRY);
error = VOP_ACCESS(scriptvp, VREAD, p->p_ucred, p);
VOP_UNLOCK(scriptvp);
if (error == EACCES || script_sbits) {
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 40966c4df66..c868f0aae4f 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.155 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.156 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -783,7 +783,7 @@ sys_fpathconf(struct proc *p, void *v, register_t *retval)
case DTYPE_VNODE:
vp = fp->f_data;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_PATHCONF(vp, SCARG(uap, name), retval);
VOP_UNLOCK(vp);
break;
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index f40ba0430de..700e6ee83d9 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.91 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.92 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -156,7 +156,7 @@ spec_open(void *v)
return (spec_open_clone(ap));
VOP_UNLOCK(vp);
error = (*cdevsw[maj].d_open)(dev, ap->a_mode, S_IFCHR, p);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
return (error);
case VBLK:
@@ -222,7 +222,7 @@ spec_read(void *v)
VOP_UNLOCK(vp);
error = (*cdevsw[major(vp->v_rdev)].d_read)
(vp->v_rdev, uio, ap->a_ioflag);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
return (error);
case VBLK:
@@ -309,7 +309,7 @@ spec_write(void *v)
VOP_UNLOCK(vp);
error = (*cdevsw[major(vp->v_rdev)].d_write)
(vp->v_rdev, uio, ap->a_ioflag);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
return (error);
case VBLK:
@@ -522,7 +522,7 @@ spec_close(void *v)
* vclean(), the vnode is already locked.
*/
if (!(vp->v_flag & VXLOCK))
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(vp, V_SAVE, ap->a_cred, p, 0, 0);
if (!(vp->v_flag & VXLOCK))
VOP_UNLOCK(vp);
@@ -553,7 +553,7 @@ spec_close(void *v)
VOP_UNLOCK(vp);
error = (*devclose)(dev, ap->a_fflag, mode, p);
if (relock)
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
return (error);
}
@@ -580,7 +580,7 @@ spec_setattr(void *v)
if (!(vp->v_flag & VCLONE))
return (EBADF);
- vn_lock(vp->v_specparent, LK_EXCLUSIVE|LK_RETRY, p);
+ vn_lock(vp->v_specparent, LK_EXCLUSIVE|LK_RETRY);
error = VOP_SETATTR(vp->v_specparent, ap->a_vap, ap->a_cred, p);
VOP_UNLOCK(vp);
@@ -728,7 +728,7 @@ spec_open_clone(struct vop_open_args *ap)
error = cdevsw[major(vp->v_rdev)].d_open(cvp->v_rdev, ap->a_mode,
S_IFCHR, ap->a_p);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, ap->a_p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error) {
vput(cvp);
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index f030029cc05..d62a91e5263 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.139 2018/04/28 15:44:59 jasper Exp $ */
+/* $OpenBSD: tty.c,v 1.140 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -795,7 +795,7 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
error = namei(&nid);
if (error)
return (error);
- vn_lock(nid.ni_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(nid.ni_vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_ACCESS(nid.ni_vp, VREAD, p->p_ucred, p);
VOP_UNLOCK(nid.ni_vp);
vrele(nid.ni_vp);
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 6e3df463d6a..da4bb63e13e 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_tty.c,v 1.23 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: tty_tty.c,v 1.24 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */
/*-
@@ -57,7 +57,7 @@ cttyopen(dev_t dev, int flag, int mode, struct proc *p)
if (ttyvp == NULL)
return (ENXIO);
- vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_OPEN(ttyvp, flag, NOCRED, p);
VOP_UNLOCK(ttyvp);
return (error);
@@ -66,13 +66,12 @@ cttyopen(dev_t dev, int flag, int mode, struct proc *p)
int
cttyread(dev_t dev, struct uio *uio, int flag)
{
- struct proc *p = uio->uio_procp;
struct vnode *ttyvp = cttyvp(uio->uio_procp);
int error;
if (ttyvp == NULL)
return (EIO);
- vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READ(ttyvp, uio, flag, NOCRED);
VOP_UNLOCK(ttyvp);
return (error);
@@ -81,13 +80,12 @@ cttyread(dev_t dev, struct uio *uio, int flag)
int
cttywrite(dev_t dev, struct uio *uio, int flag)
{
- struct proc *p = uio->uio_procp;
struct vnode *ttyvp = cttyvp(uio->uio_procp);
int error;
if (ttyvp == NULL)
return (EIO);
- vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_WRITE(ttyvp, uio, flag, NOCRED);
VOP_UNLOCK(ttyvp);
return (error);
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 39f2b21d393..c1c87183b8a 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cache.c,v 1.54 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vfs_cache.c,v 1.55 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */
/*
@@ -217,7 +217,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp,
* ISLASTCN is set, lock the directory vnode as well.
*/
if (!error && (~cnp->cn_flags & (LOCKPARENT|ISLASTCN)) == 0) {
- if ((error = vn_lock(dvp, LK_EXCLUSIVE, p)) != 0) {
+ if ((error = vn_lock(dvp, LK_EXCLUSIVE)) != 0) {
vput(vp);
return (error);
}
@@ -252,7 +252,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp,
*/
if (vp == dvp || error ||
(~cnp->cn_flags & (LOCKPARENT|ISLASTCN)) != 0) {
- if ((error = vn_lock(dvp, LK_EXCLUSIVE, p)) != 0)
+ if ((error = vn_lock(dvp, LK_EXCLUSIVE)) != 0)
return (error);
cnp->cn_flags &= ~PDIRUNLOCK;
}
diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c
index 6ada9e640f6..7aa36d540e0 100644
--- a/sys/kern/vfs_getcwd.c
+++ b/sys/kern/vfs_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_getcwd.c,v 1.29 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vfs_getcwd.c,v 1.30 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*
@@ -253,7 +253,7 @@ vfs_getcwd_getcache(struct vnode **lvpp, struct vnode **uvpp, char **bpp,
*uvpp = NULL;
- error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p);
+ error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY);
if (!error) {
*bpp = obp; /* restore the buffer */
return (-1);
@@ -285,7 +285,7 @@ vfs_getcwd_common(struct vnode *lvp, struct vnode *rvp, char **bpp, char *bufp,
vref(rvp);
vref(lvp);
- error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p);
+ error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY);
if (error) {
vrele(lvp);
lvp = NULL;
@@ -338,7 +338,7 @@ vfs_getcwd_common(struct vnode *lvp, struct vnode *rvp, char **bpp, char *bufp,
vref(lvp);
- error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p);
+ error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY);
if (error) {
vrele(lvp);
lvp = NULL;
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index fbf5d73499a..d79d45ef2ac 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lookup.c,v 1.68 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.69 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
@@ -334,7 +334,6 @@ vfs_lookup(struct nameidata *ndp)
int dpunlocked = 0; /* dp has already been unlocked */
int slashes;
struct componentname *cnp = &ndp->ni_cnd;
- struct proc *p = cnp->cn_proc;
/*
* Setup: break out flag bits into variables.
*/
@@ -348,7 +347,7 @@ vfs_lookup(struct nameidata *ndp)
cnp->cn_flags &= ~ISSYMLINK;
dp = ndp->ni_startdir;
ndp->ni_startdir = NULLVP;
- vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(dp, LK_EXCLUSIVE | LK_RETRY);
/*
* If we have a leading string of slashes, remove them, and just make
@@ -475,7 +474,7 @@ dirloop:
dp = dp->v_mount->mnt_vnodecovered;
vput(tdp);
vref(dp);
- vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(dp, LK_EXCLUSIVE | LK_RETRY);
}
}
@@ -643,7 +642,6 @@ bad:
int
vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
{
- struct proc *p = cnp->cn_proc;
struct vnode *dp = 0; /* the directory we are searching */
int wantparent; /* 1 => wantparent or lockparent flag */
int rdonly; /* lookup read-only flag bit */
@@ -659,7 +657,7 @@ vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
rdonly = cnp->cn_flags & RDONLY;
cnp->cn_flags &= ~ISSYMLINK;
dp = dvp;
- vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(dp, LK_EXCLUSIVE | LK_RETRY);
/* dirloop: */
/*
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 5b9bd48a46d..ed70164c0b5 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.268 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.269 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -640,7 +640,7 @@ vget(struct vnode *vp, int flags, struct proc *p)
vp->v_usecount++;
if (flags & LK_TYPE_MASK) {
- if ((error = vn_lock(vp, flags, p)) != 0) {
+ if ((error = vn_lock(vp, flags)) != 0) {
vp->v_usecount--;
if (vp->v_usecount == 0 && onfreelist)
vputonfreelist(vp);
@@ -767,7 +767,7 @@ vrele(struct vnode *vp)
}
#endif
- if (vn_lock(vp, LK_EXCLUSIVE, p)) {
+ if (vn_lock(vp, LK_EXCLUSIVE)) {
#ifdef DIAGNOSTIC
vprint("vrele: cannot lock", vp);
#endif
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 978e932d571..e95b7a59a81 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.281 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.282 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -752,7 +752,7 @@ sys_fchdir(struct proc *p, void *v, register_t *retval)
}
vref(vp);
FRELE(fp, p);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p);
while (!error && (mp = vp->v_mountedhere) != NULL) {
@@ -974,7 +974,7 @@ doopenat(struct proc *p, int fd, const char *path, int oflags, mode_t mode,
closef(fp, p);
goto out;
}
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
fp->f_iflags |= FIF_HASLOCK;
}
if (localtrunc) {
@@ -1155,7 +1155,7 @@ sys_fhopen(struct proc *p, void *v, register_t *retval)
vp = NULL; /* closef will vn_close the file */
goto bad;
}
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
fp->f_iflags |= FIF_HASLOCK;
}
VOP_UNLOCK(vp);
@@ -1989,7 +1989,7 @@ dovchflags(struct proc *p, struct vnode *vp, u_int flags)
struct vattr vattr;
int error;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount && vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else if (flags == VNOVAL)
@@ -2062,7 +2062,7 @@ dofchmodat(struct proc *p, int fd, const char *path, mode_t mode, int flag)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else {
@@ -2098,7 +2098,7 @@ sys_fchmod(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = fp->f_data;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount && vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else {
@@ -2161,7 +2161,7 @@ dofchownat(struct proc *p, int fd, const char *path, uid_t uid, gid_t gid,
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else {
@@ -2213,7 +2213,7 @@ sys_lchown(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else {
@@ -2263,7 +2263,7 @@ sys_fchown(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = fp->f_data;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else {
@@ -2415,7 +2415,7 @@ dovutimens(struct proc *p, struct vnode *vp, struct timespec ts[2])
vattr.va_mtime = ts[1];
}
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
else
@@ -2511,7 +2511,7 @@ sys_truncate(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_type == VDIR)
error = EISDIR;
else if ((error = VOP_ACCESS(vp, VWRITE, p->p_ucred, p)) == 0 &&
@@ -2549,7 +2549,7 @@ sys_ftruncate(struct proc *p, void *v, register_t *retval)
goto bad;
}
vp = fp->f_data;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (vp->v_type == VDIR)
error = EISDIR;
else if ((error = vn_writechk(vp)) == 0) {
@@ -2579,7 +2579,7 @@ sys_fsync(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = fp->f_data;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
#ifdef FFS_SOFTUPDATES
if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP))
@@ -2818,7 +2818,7 @@ sys_getdents(struct proc *p, void *v, register_t *retval)
auio.uio_segflg = UIO_USERSPACE;
auio.uio_procp = p;
auio.uio_resid = buflen;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
auio.uio_offset = fp->f_offset;
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag);
fp->f_offset = auio.uio_offset;
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 0946c8aa0cd..948306ce7aa 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.91 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.92 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -282,7 +282,7 @@ vn_close(struct vnode *vp, int flags, struct ucred *cred, struct proc *p)
if (flags & FWRITE)
vp->v_writecount--;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_CLOSE(vp, flags, cred, p);
vput(vp);
return (error);
@@ -311,7 +311,7 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp, caddr_t base, int len, off_t offset,
auio.uio_procp = p;
if ((ioflg & IO_NODELOCKED) == 0)
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (rw == UIO_READ) {
error = VOP_READ(vp, &auio, ioflg, cred);
} else {
@@ -337,7 +337,6 @@ vn_read(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
struct vnode *vp = fp->f_data;
int error;
size_t count = uio->uio_resid;
- struct proc *p = uio->uio_procp;
/* no wrap around of offsets except on character devices */
if (vp->v_type != VCHR && count > LLONG_MAX - *poff)
@@ -346,7 +345,7 @@ vn_read(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
if (vp->v_type == VDIR)
return (EISDIR);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
uio->uio_offset = *poff;
error = VOP_READ(vp, uio, (fp->f_flag & FNONBLOCK) ? IO_NDELAY : 0,
cred);
@@ -362,7 +361,6 @@ int
vn_write(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
{
struct vnode *vp = fp->f_data;
- struct proc *p = uio->uio_procp;
int error, ioflag = IO_UNIT;
size_t count;
@@ -375,7 +373,7 @@ vn_write(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
if ((fp->f_flag & FFSYNC) ||
(vp->v_mount && (vp->v_mount->mnt_flag & MNT_SYNCHRONOUS)))
ioflag |= IO_SYNC;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
uio->uio_offset = *poff;
count = uio->uio_resid;
error = VOP_WRITE(vp, uio, ioflag, cred);
@@ -518,7 +516,7 @@ vn_poll(struct file *fp, int events, struct proc *p)
* acquire requested lock.
*/
int
-vn_lock(struct vnode *vp, int flags, struct proc *p)
+vn_lock(struct vnode *vp, int flags)
{
int error;