summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/vdsp.c14
-rw-r--r--sys/dev/diskmap.c4
-rw-r--r--sys/dev/softraid.c5
-rw-r--r--sys/isofs/cd9660/cd9660_lookup.c7
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c8
-rw-r--r--sys/isofs/udf/udf_vfsops.c8
-rw-r--r--sys/isofs/udf/udf_vnops.c5
-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
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c13
-rw-r--r--sys/miscfs/fuse/fuse_lookup.c6
-rw-r--r--sys/miscfs/fuse/fuse_vnops.c6
-rw-r--r--sys/msdosfs/msdosfs_denode.c5
-rw-r--r--sys/msdosfs/msdosfs_lookup.c8
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c10
-rw-r--r--sys/msdosfs/msdosfs_vnops.c5
-rw-r--r--sys/nfs/nfs_serv.c6
-rw-r--r--sys/nfs/nfs_vfsops.c4
-rw-r--r--sys/nfs/nfs_vnops.c9
-rw-r--r--sys/ntfs/ntfs_vfsops.c10
-rw-r--r--sys/ntfs/ntfs_vnops.c6
-rw-r--r--sys/sys/vnode.h4
-rw-r--r--sys/tmpfs/tmpfs_subr.c4
-rw-r--r--sys/tmpfs/tmpfs_vnops.c8
-rw-r--r--sys/ufs/ext2fs/ext2fs_lookup.c7
-rw-r--r--sys/ufs/ext2fs/ext2fs_vfsops.c10
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c10
-rw-r--r--sys/ufs/ffs/ffs_softdep.c6
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c14
-rw-r--r--sys/ufs/ufs/ufs_lookup.c11
-rw-r--r--sys/ufs/ufs/ufs_quota.c8
-rw-r--r--sys/ufs/ufs/ufs_vnops.c10
-rw-r--r--sys/uvm/uvm_vnode.c6
42 files changed, 162 insertions, 187 deletions
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c
index a08778cc7f1..9d50c2ffe18 100644
--- a/sys/arch/sparc64/dev/vdsp.c
+++ b/sys/arch/sparc64/dev/vdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsp.c,v 1.44 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: vdsp.c,v 1.45 2018/05/02 02:24:55 visa Exp $ */
/*
* Copyright (c) 2009, 2011, 2014 Mark Kettenis
*
@@ -1011,7 +1011,7 @@ vdsp_readlabel(struct vdsp_softc *sc)
uio.uio_rw = UIO_READ;
uio.uio_procp = p;
- vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY);
err = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp);
if (err) {
@@ -1041,7 +1041,7 @@ vdsp_writelabel(struct vdsp_softc *sc)
uio.uio_rw = UIO_WRITE;
uio.uio_procp = p;
- vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY);
err = VOP_WRITE(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp);
@@ -1072,7 +1072,7 @@ vdsp_is_iso(struct vdsp_softc *sc)
uio.uio_rw = UIO_READ;
uio.uio_procp = p;
- vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY);
err = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp);
@@ -1151,7 +1151,7 @@ vdsp_read_desc(struct vdsp_softc *sc, struct vdsk_desc_msg *dm)
uio.uio_rw = UIO_READ;
uio.uio_procp = p;
- vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY);
dm->status = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp);
@@ -1225,7 +1225,7 @@ vdsp_read_dring(void *arg1, void *arg2)
uio.uio_rw = UIO_READ;
uio.uio_procp = p;
- vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY);
vd->status = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp);
@@ -1324,7 +1324,7 @@ vdsp_write_dring(void *arg1, void *arg2)
uio.uio_rw = UIO_WRITE;
uio.uio_procp = p;
- vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY);
vd->status = VOP_WRITE(sc->sc_vp, &uio, 0, p->p_ucred);
VOP_UNLOCK(sc->sc_vp);
diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c
index a61644f7810..75418fff9f5 100644
--- a/sys/dev/diskmap.c
+++ b/sys/dev/diskmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskmap.c,v 1.18 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: diskmap.c,v 1.19 2018/05/02 02:24:55 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org>
@@ -99,7 +99,7 @@ diskmapioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
ovp->v_writecount--;
if (ovp->v_writecount == 0) {
- vn_lock(ovp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ovp, LK_EXCLUSIVE | LK_RETRY);
VOP_CLOSE(ovp, fp->f_flag, p->p_ucred, p);
vput(ovp);
}
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 0e69dc4829d..d9820001d58 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.391 2018/02/08 06:02:09 deraadt Exp $ */
+/* $OpenBSD: softraid.c,v 1.392 2018/05/02 02:24:55 visa Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -3832,8 +3832,7 @@ sr_chunks_unwind(struct sr_softc *sc, struct sr_chunk_head *cl)
* the problem introduced by vnode aliasing... specfs
* has no locking, whereas ufs/ffs does!
*/
- vn_lock(ch_entry->src_vn, LK_EXCLUSIVE |
- LK_RETRY, curproc);
+ vn_lock(ch_entry->src_vn, LK_EXCLUSIVE | LK_RETRY);
VOP_CLOSE(ch_entry->src_vn, FREAD | FWRITE, NOCRED,
curproc);
vput(ch_entry->src_vn);
diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c
index c4ec9abfd51..855ab904672 100644
--- a/sys/isofs/cd9660/cd9660_lookup.c
+++ b/sys/isofs/cd9660/cd9660_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_lookup.c,v 1.26 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: cd9660_lookup.c,v 1.27 2018/05/02 02:24:55 visa Exp $ */
/* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */
/*-
@@ -122,7 +122,6 @@ cd9660_lookup(v)
struct ucred *cred = cnp->cn_cred;
int flags;
int nameiop = cnp->cn_nameiop;
- struct proc *p = cnp->cn_proc;
cnp->cn_flags &= ~PDIRUNLOCK;
flags = cnp->cn_flags;
@@ -381,12 +380,12 @@ found:
error = cd9660_vget_internal(vdp->v_mount, dp->i_ino, &tdp,
dp->i_ino != ino, NULL);
if (error) {
- if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
return (error);
}
if (lockparent && (flags & ISLASTCN)) {
- if ((error = vn_lock(pdp, LK_EXCLUSIVE, p))) {
+ if ((error = vn_lock(pdp, LK_EXCLUSIVE))) {
vput(tdp);
return (error);
}
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index 94c8c56c3d0..7a0037ee6b0 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vfsops.c,v 1.89 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.90 2018/05/02 02:24:55 visa Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
@@ -242,7 +242,7 @@ iso_mountfs(devvp, mp, p, argp)
return (error);
if (vcount(devvp) > 1 && devvp != rootvp)
return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
VOP_UNLOCK(devvp);
if (error)
@@ -436,7 +436,7 @@ out:
if (supbp)
brelse(supbp);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
VOP_UNLOCK(devvp);
@@ -570,7 +570,7 @@ cd9660_unmount(mp, mntflags, p)
isomp = VFSTOISOFS(mp);
isomp->im_devvp->v_specmountpoint = NULL;
- vn_lock(isomp->im_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(isomp->im_devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
vput(isomp->im_devvp);
free((caddr_t)isomp, M_ISOFSMNT, 0);
diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c
index 83d8a6f8e9a..360790b9d90 100644
--- a/sys/isofs/udf/udf_vfsops.c
+++ b/sys/isofs/udf/udf_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udf_vfsops.c,v 1.64 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.65 2018/05/02 02:24:55 visa Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -238,7 +238,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, uint32_t lb, struct proc *p)
return (error);
if (vcount(devvp) > 1 && devvp != rootvp)
return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
VOP_UNLOCK(devvp);
if (error)
@@ -441,7 +441,7 @@ bail:
if (bp != NULL)
brelse(bp);
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY);
VOP_CLOSE(devvp, FREAD, FSCRED, p);
VOP_UNLOCK(devvp);
@@ -464,7 +464,7 @@ udf_unmount(struct mount *mp, int mntflags, struct proc *p)
if ((error = vflush(mp, NULL, flags)))
return (error);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
vinvalbuf(devvp, V_SAVE, NOCRED, p, 0, 0);
(void)VOP_CLOSE(devvp, FREAD, NOCRED, p);
VOP_UNLOCK(devvp);
diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c
index 54876a84077..b8c670b1981 100644
--- a/sys/isofs/udf/udf_vnops.c
+++ b/sys/isofs/udf/udf_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udf_vnops.c,v 1.65 2018/04/28 03:13:04 visa Exp $ */
+/* $OpenBSD: udf_vnops.c,v 1.66 2018/05/02 02:24:56 visa Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -124,11 +124,10 @@ udf_hashins(struct unode *up)
{
struct umount *ump;
struct udf_hash_lh *lh;
- struct proc *p = curproc;
ump = up->u_ump;
- vn_lock(up->u_vnode, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(up->u_vnode, LK_EXCLUSIVE | LK_RETRY);
mtx_enter(&ump->um_hashmtx);
lh = &ump->um_hashtbl[SipHash24(&ump->um_hashkey,
&up->u_ino, sizeof(up->u_ino)) & ump->um_hashsz];
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;
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index 6fb53cb2f22..03a5677a05d 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.65 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.66 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -123,7 +123,6 @@ fifo_open(void *v)
struct vop_open_args *ap = v;
struct vnode *vp = ap->a_vp;
struct fifoinfo *fip;
- struct proc *p = ap->a_p;
struct socket *rso, *wso;
int s, error;
@@ -186,7 +185,7 @@ fifo_open(void *v)
VOP_UNLOCK(vp);
error = tsleep(&fip->fi_readers,
PCATCH | PSOCK, "fifor", 0);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error)
goto bad;
}
@@ -194,7 +193,7 @@ fifo_open(void *v)
VOP_UNLOCK(vp);
error = tsleep(&fip->fi_writers,
PCATCH | PSOCK, "fifow", 0);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error)
goto bad;
}
@@ -215,7 +214,6 @@ fifo_read(void *v)
struct vop_read_args *ap = v;
struct uio *uio = ap->a_uio;
struct socket *rso = ap->a_vp->v_fifoinfo->fi_readsock;
- struct proc *p = uio->uio_procp;
int error;
#ifdef DIAGNOSTIC
@@ -228,7 +226,7 @@ fifo_read(void *v)
rso->so_state |= SS_NBIO;
VOP_UNLOCK(ap->a_vp);
error = soreceive(rso, NULL, uio, NULL, NULL, NULL, 0);
- vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
if (ap->a_ioflag & IO_NDELAY) {
rso->so_state &= ~SS_NBIO;
if (error == EWOULDBLOCK &&
@@ -247,7 +245,6 @@ fifo_write(void *v)
{
struct vop_write_args *ap = v;
struct socket *wso = ap->a_vp->v_fifoinfo->fi_writesock;
- struct proc *p = ap->a_uio->uio_procp;
int error;
#ifdef DIAGNOSTIC
@@ -259,7 +256,7 @@ fifo_write(void *v)
wso->so_state |= SS_NBIO;
VOP_UNLOCK(ap->a_vp);
error = sosend(wso, NULL, ap->a_uio, NULL, NULL, 0);
- vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
if (ap->a_ioflag & IO_NDELAY)
wso->so_state &= ~SS_NBIO;
return (error);
diff --git a/sys/miscfs/fuse/fuse_lookup.c b/sys/miscfs/fuse/fuse_lookup.c
index 5bc23fc63d1..e95ff4eefd6 100644
--- a/sys/miscfs/fuse/fuse_lookup.c
+++ b/sys/miscfs/fuse/fuse_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fuse_lookup.c,v 1.18 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: fuse_lookup.c,v 1.19 2018/05/02 02:24:56 visa Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -155,7 +155,7 @@ fusefs_lookup(void *v)
error = VFS_VGET(fmp->mp, nid, &tdp);
if (error) {
- if (vn_lock(vdp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(vdp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
goto reclaim;
@@ -164,7 +164,7 @@ fusefs_lookup(void *v)
tdp->v_type = nvtype;
if (lockparent && (flags & ISLASTCN)) {
- if ((error = vn_lock(vdp, LK_EXCLUSIVE, p))) {
+ if ((error = vn_lock(vdp, LK_EXCLUSIVE))) {
vput(tdp);
return (error);
}
diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c
index cecbac68760..eff3be0829b 100644
--- a/sys/miscfs/fuse/fuse_vnops.c
+++ b/sys/miscfs/fuse/fuse_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fuse_vnops.c,v 1.38 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: fuse_vnops.c,v 1.39 2018/05/02 02:24:56 visa Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -573,7 +573,7 @@ fusefs_link(void *v)
error = EXDEV;
goto out2;
}
- if (dvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) {
+ if (dvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE))) {
VOP_ABORTOP(dvp, cnp);
goto out2;
}
@@ -1191,7 +1191,7 @@ abortit:
goto abortit;
}
- if ((error = vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY, p)) != 0)
+ if ((error = vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY)) != 0)
goto abortit;
dp = VTOI(fdvp);
ip = VTOI(fvp);
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index 9ff5d6086ec..d50f5bc0283 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_denode.c,v 1.61 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.62 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */
/*-
@@ -189,7 +189,6 @@ deget(struct msdosfsmount *pmp, uint32_t dirclust, uint32_t diroffset,
struct denode *ldep;
struct vnode *nvp;
struct buf *bp;
- struct proc *p = curproc; /* XXX */
#ifdef MSDOSFS_DEBUG
printf("deget(pmp %p, dirclust %d, diroffset %x, depp %p)\n",
@@ -249,7 +248,7 @@ retry:
* can't be accessed until we've read it in and have done what we
* need to it.
*/
- vn_lock(nvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(nvp, LK_EXCLUSIVE | LK_RETRY);
error = msdosfs_hashins(ldep);
if (error) {
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index dab91299e80..73c9d41989f 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_lookup.c,v 1.31 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: msdosfs_lookup.c,v 1.32 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 ws Exp $ */
/*-
@@ -85,7 +85,6 @@ msdosfs_lookup(void *v)
struct vnode *vdp = ap->a_dvp;
struct vnode **vpp = ap->a_vpp;
struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
daddr_t bn;
int error;
int lockparent;
@@ -552,13 +551,12 @@ foundroot:;
VOP_UNLOCK(pdp); /* race to get the inode */
cnp->cn_flags |= PDIRUNLOCK;
if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0) {
- if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
return (error);
}
if (lockparent && (flags & ISLASTCN)) {
- if ((error = vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY,
- p))) {
+ if ((error = vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY))) {
vput(DETOV(tdp));
return (error);
}
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index e8b7fac2c5c..8960a77a204 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.88 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.89 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -281,7 +281,7 @@ msdosfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p,
return (error);
if (vcount(devvp) > 1 && devvp != rootvp)
return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
VOP_UNLOCK(devvp);
if (error)
@@ -564,7 +564,7 @@ error_exit:
if (bp)
brelse(bp);
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY);
(void) VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
VOP_UNLOCK(devvp);
@@ -605,7 +605,7 @@ msdosfs_unmount(struct mount *mp, int mntflags,struct proc *p)
#ifdef MSDOSFS_DEBUG
vprint("msdosfs_umount(): just before calling VOP_CLOSE()\n", vp);
#endif
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(vp,
pmp->pm_flags & MSDOSFSMNT_RONLY ? FREAD : FREAD|FWRITE, NOCRED, p);
vput(vp);
@@ -721,7 +721,7 @@ msdosfs_sync(struct mount *mp, int waitfor, int stall, struct ucred *cred,
* Force stale file system control information to be flushed.
*/
if (waitfor != MNT_LAZY) {
- vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = VOP_FSYNC(pmp->pm_devvp, cred, waitfor, p)) != 0)
msa.allerror = error;
VOP_UNLOCK(pmp->pm_devvp);
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index f5d5e5f34f4..a592cd75010 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.118 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.119 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -944,7 +944,6 @@ msdosfs_rename(void *v)
struct vnode *fdvp = ap->a_fdvp;
struct componentname *tcnp = ap->a_tcnp;
struct componentname *fcnp = ap->a_fcnp;
- struct proc *p = curproc; /* XXX */
struct denode *ip, *xp, *dp, *zp;
u_char toname[11], oldname[11];
uint32_t from_diroffset, to_diroffset;
@@ -993,7 +992,7 @@ abortit:
}
/* */
- if ((error = vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY, p)) != 0)
+ if ((error = vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY)) != 0)
goto abortit;
dp = VTODE(fdvp);
ip = VTODE(fvp);
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 0c72f1c00c5..4bcff919c76 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.113 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.114 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -2119,7 +2119,7 @@ again:
io.uio_procp = NULL;
eofflag = 0;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, procp);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READDIR(vp, &io, cred, &eofflag);
off = (off_t)io.uio_offset;
@@ -2319,7 +2319,7 @@ again:
io.uio_procp = NULL;
eofflag = 0;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, procp);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READDIR(vp, &io, cred, &eofflag);
off = (u_quad_t)io.uio_offset;
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 628a381f3cc..3d850004a8c 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.118 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.119 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -764,7 +764,7 @@ nfs_root(struct mount *mp, struct vnode **vpp)
nmp = VFSTONFS(mp);
vp = nmp->nm_vnode;
vref(vp);
- error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
+ error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error) {
vrele(vp);
return (error);
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 90ecf936bef..0ca3fe61eb0 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.174 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.175 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -750,7 +750,6 @@ nfs_lookup(void *v)
struct componentname *cnp = ap->a_cnp;
struct vnode *dvp = ap->a_dvp;
struct vnode **vpp = ap->a_vpp;
- struct proc *p = cnp->cn_proc;
struct nfsm_info info;
int flags;
struct vnode *newvp;
@@ -799,7 +798,7 @@ nfs_lookup(void *v)
}
if (cnp->cn_flags & PDIRUNLOCK) {
- err2 = vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p);
+ err2 = vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
if (err2 != 0) {
*vpp = NULLVP;
return (err2);
@@ -923,7 +922,7 @@ dorpc:
error = nfs_nget(dvp->v_mount, fhp, fhsize, &np);
if (error) {
- if (vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
m_freem(info.nmi_mrep);
return (error);
@@ -937,7 +936,7 @@ dorpc:
nfsm_loadattr(newvp, NULL);
if (lockparent && (flags & ISLASTCN)) {
- if ((error = vn_lock(dvp, LK_EXCLUSIVE, p))) {
+ if ((error = vn_lock(dvp, LK_EXCLUSIVE))) {
m_freem(info.nmi_mrep);
vput(newvp);
return error;
diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c
index 4abef47d94b..2916e1b6fd4 100644
--- a/sys/ntfs/ntfs_vfsops.c
+++ b/sys/ntfs/ntfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vfsops.c,v 1.59 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ntfs_vfsops.c,v 1.60 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */
/*-
@@ -278,7 +278,7 @@ ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp,
ncount = vcount(devvp);
if (ncount > 1 && devvp != rootvp)
return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
VOP_UNLOCK(devvp);
if (error)
@@ -443,7 +443,7 @@ out:
}
/* lock the device vnode before calling VOP_CLOSE() */
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp, FREAD, NOCRED, p);
VOP_UNLOCK(devvp);
@@ -502,7 +502,7 @@ ntfs_unmount(struct mount *mp, int mntflags, struct proc *p)
ntmp->ntm_devvp->v_specmountpoint = NULL;
/* lock the device vnode before calling VOP_CLOSE() */
- vn_lock(ntmp->ntm_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ntmp->ntm_devvp, LK_EXCLUSIVE | LK_RETRY);
vinvalbuf(ntmp->ntm_devvp, V_SAVE, NOCRED, p, 0, 0);
(void)VOP_CLOSE(ntmp->ntm_devvp, FREAD, NOCRED, p);
vput(ntmp->ntm_devvp);
@@ -761,7 +761,7 @@ ntfs_vgetex(struct mount *mp, ntfsino_t ino, u_int32_t attrtype, char *attrname,
vp->v_flag |= VROOT;
if (lkflags & LK_TYPE_MASK) {
- error = vn_lock(vp, lkflags, p);
+ error = vn_lock(vp, lkflags);
if (error) {
vput(vp);
return (error);
diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c
index 55edd6de2c6..2510c6d1421 100644
--- a/sys/ntfs/ntfs_vnops.c
+++ b/sys/ntfs/ntfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vnops.c,v 1.43 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ntfs_vnops.c,v 1.44 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
/*
@@ -584,13 +584,13 @@ ntfs_lookup(void *v)
vap->va_a_name->n_pnumber,ap->a_vpp);
ntfs_ntvattrrele(vap);
if (error) {
- if (vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
return (error);
}
if (lockparent && (cnp->cn_flags & ISLASTCN)) {
- error = vn_lock(dvp, LK_EXCLUSIVE, p);
+ error = vn_lock(dvp, LK_EXCLUSIVE);
if (error) {
vput( *(ap->a_vpp) );
return (error);
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index b8c508544e7..43ae93e32ba 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.144 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: vnode.h,v 1.145 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -633,7 +633,7 @@ int vn_rdwr(enum uio_rw, struct vnode *, caddr_t, int, off_t,
enum uio_seg, int, struct ucred *, size_t *, struct proc *);
int vn_stat(struct vnode *, struct stat *, struct proc *);
int vn_statfile(struct file *, struct stat *, struct proc *);
-int vn_lock(struct vnode *, int, struct proc *);
+int vn_lock(struct vnode *, int);
int vn_writechk(struct vnode *);
int vn_fsizechk(struct vnode *, struct uio *, int, ssize_t *);
int vn_ioctl(struct file *, u_long, caddr_t, struct proc *);
diff --git a/sys/tmpfs/tmpfs_subr.c b/sys/tmpfs/tmpfs_subr.c
index 037de2f4bb9..6216a56efb5 100644
--- a/sys/tmpfs/tmpfs_subr.c
+++ b/sys/tmpfs/tmpfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfs_subr.c,v 1.19 2018/03/28 16:34:28 visa Exp $ */
+/* $OpenBSD: tmpfs_subr.c,v 1.20 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: tmpfs_subr.c,v 1.79 2012/03/13 18:40:50 elad Exp $ */
/*
@@ -352,7 +352,7 @@ again:
uvm_vnp_setsize(vp, node->tn_size);
vp->v_data = node;
node->tn_vnode = vp;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
rw_exit_write(&node->tn_nlock);
KASSERT(VOP_ISLOCKED(vp));
diff --git a/sys/tmpfs/tmpfs_vnops.c b/sys/tmpfs/tmpfs_vnops.c
index c675ec07f48..017885cb83b 100644
--- a/sys/tmpfs/tmpfs_vnops.c
+++ b/sys/tmpfs/tmpfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfs_vnops.c,v 1.28 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: tmpfs_vnops.c,v 1.29 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */
/*
@@ -189,7 +189,7 @@ tmpfs_lookup(void *v)
* Release the tn_nlock.
*/
error = tmpfs_vnode_get(dvp->v_mount, pnode, vpp);
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, curproc);
+ vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
goto out;
} else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
@@ -791,7 +791,7 @@ tmpfs_link(void *v)
dnode = VP_TO_TMPFS_DIR(dvp);
node = VP_TO_TMPFS_NODE(vp);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
/* Check for maximum number of links limit. */
if (node->tn_links == LINK_MAX) {
@@ -1910,7 +1910,7 @@ tmpfs_rename_lock_directory(struct vnode *vp, struct tmpfs_node *node)
KASSERT(node->tn_vnode == vp);
KASSERT(node->tn_type == VDIR);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (node->tn_spec.tn_dir.tn_parent == NULL) {
VOP_UNLOCK(vp);
return ENOENT;
diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c
index 6f90182b61b..a35b0b00aa4 100644
--- a/sys/ufs/ext2fs/ext2fs_lookup.c
+++ b/sys/ufs/ext2fs/ext2fs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_lookup.c,v 1.43 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ext2fs_lookup.c,v 1.44 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ext2fs_lookup.c,v 1.16 2000/08/03 20:29:26 thorpej Exp $ */
/*
@@ -249,7 +249,6 @@ ext2fs_lookup(void *v)
struct ucred *cred = cnp->cn_cred;
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
- struct proc *p = cnp->cn_proc;
int dirblksize, entry_found = 0, error;
ss.slotstatus = FOUND;
@@ -568,12 +567,12 @@ found:
VOP_UNLOCK(pdp); /* race to get the inode */
cnp->cn_flags |= PDIRUNLOCK;
if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0) {
- if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
return (error);
}
if (lockparent && (flags & ISLASTCN)) {
- if ((error = vn_lock(pdp, LK_EXCLUSIVE, p)) != 0) {
+ if ((error = vn_lock(pdp, LK_EXCLUSIVE)) != 0) {
vput(tdp);
return (error);
}
diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c
index 754263e598d..1fa9ea224f6 100644
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vfsops.c,v 1.105 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ext2fs_vfsops.c,v 1.106 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */
/*
@@ -570,7 +570,7 @@ out:
devvp->v_specmountpoint = NULL;
if (bp)
brelse(bp);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
VOP_UNLOCK(devvp);
if (ump) {
@@ -609,7 +609,7 @@ ext2fs_unmount(struct mount *mp, int mntflags, struct proc *p)
if (ump->um_devvp->v_type != VBAD)
ump->um_devvp->v_specmountpoint = NULL;
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(ump->um_devvp, fs->e2fs_ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
vput(ump->um_devvp);
@@ -639,7 +639,7 @@ ext2fs_flushfiles(struct mount *mp, int flags, struct proc *p)
/*
* Flush filesystem metadata.
*/
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(ump->um_devvp, p->p_ucred, MNT_WAIT, p);
VOP_UNLOCK(ump->um_devvp);
return (error);
@@ -777,7 +777,7 @@ ext2fs_sync(struct mount *mp, int waitfor, int stall,
* Force stale file system control information to be flushed.
*/
if (waitfor != MNT_LAZY) {
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0)
allerror = error;
VOP_UNLOCK(ump->um_devvp);
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index f40cf7d5ff1..117576a12e6 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.80 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.81 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -432,7 +432,6 @@ ext2fs_link(void *v)
struct vnode *dvp = ap->a_dvp;
struct vnode *vp = ap->a_vp;
struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
struct inode *ip;
int error;
@@ -450,7 +449,7 @@ ext2fs_link(void *v)
error = EXDEV;
goto out2;
}
- if (dvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) {
+ if (dvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE))) {
VOP_ABORTOP(dvp, cnp);
goto out2;
}
@@ -518,7 +517,6 @@ ext2fs_rename(void *v)
struct componentname *tcnp = ap->a_tcnp;
struct componentname *fcnp = ap->a_fcnp;
struct inode *ip, *xp, *dp;
- struct proc *p = fcnp->cn_proc;
struct ext2fs_dirtemplate dirbuf;
/* struct timespec ts; */
int doingdirectory = 0, oldparent = 0, newparent = 0;
@@ -580,7 +578,7 @@ abortit:
(void) vfs_relookup(fdvp, &fvp, fcnp);
return (VOP_REMOVE(fdvp, fvp, fcnp));
}
- if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0)
+ if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto abortit;
dp = VTOI(fdvp);
ip = VTOI(fvp);
@@ -874,7 +872,7 @@ bad:
out:
if (doingdirectory)
ip->i_flag &= ~IN_RENAME;
- if (vn_lock(fvp, LK_EXCLUSIVE, p) == 0) {
+ if (vn_lock(fvp, LK_EXCLUSIVE) == 0) {
ip->i_e2fs_nlink--;
ip->i_flag |= IN_CHANGE;
vput(fvp);
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index cea2d15e1d4..23a54fa94b3 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.141 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.142 2018/05/02 02:24:56 visa Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -866,7 +866,7 @@ softdep_flushworklist(struct mount *oldmnt, int *countp, struct proc *p)
devvp = VFSTOUFS(oldmnt)->um_devvp;
while ((count = softdep_process_worklist(oldmnt)) > 0) {
*countp += count;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(devvp, p->p_ucred, MNT_WAIT, p);
VOP_UNLOCK(devvp);
if (error)
@@ -4580,7 +4580,7 @@ softdep_fsync(struct vnode *vp)
FREE_LOCK(&lk);
VOP_UNLOCK(vp);
error = VFS_VGET(mnt, parentino, &pvp);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error != 0)
return (error);
/*
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 2800d995412..de8c5bb2a3b 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.175 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.176 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -562,7 +562,7 @@ ffs_reload(struct mount *mountp, struct ucred *cred, struct proc *p)
* Step 1: invalidate all cached meta-data.
*/
devvp = VFSTOUFS(mountp)->um_devvp;
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, 0, cred, p, 0, 0);
VOP_UNLOCK(devvp);
if (error)
@@ -708,7 +708,7 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
return (error);
if (vcount(devvp) > 1 && devvp != rootvp)
return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
error = vinvalbuf(devvp, V_SAVE, cred, p, 0, 0);
VOP_UNLOCK(devvp);
if (error)
@@ -931,7 +931,7 @@ out:
if (bp)
brelse(bp);
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
+ vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
VOP_UNLOCK(devvp);
@@ -1050,7 +1050,7 @@ ffs_unmount(struct mount *mp, int mntflags, struct proc *p)
}
ump->um_devvp->v_specmountpoint = NULL;
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
vinvalbuf(ump->um_devvp, V_SAVE, NOCRED, p, 0, 0);
(void)VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
@@ -1096,7 +1096,7 @@ ffs_flushfiles(struct mount *mp, int flags, struct proc *p)
/*
* Flush filesystem metadata.
*/
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(ump->um_devvp, p->p_ucred, MNT_WAIT, p);
VOP_UNLOCK(ump->um_devvp);
return (error);
@@ -1249,7 +1249,7 @@ ffs_sync(struct mount *mp, int waitfor, int stall, struct ucred *cred, struct pr
goto loop;
}
if (waitfor != MNT_LAZY) {
- vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0)
allerror = error;
VOP_UNLOCK(ump->um_devvp);
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index e27b0cb600e..8d8e0caf939 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_lookup.c,v 1.51 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ufs_lookup.c,v 1.52 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */
/*
@@ -128,7 +128,6 @@ ufs_lookup(void *v)
struct ucred *cred = cnp->cn_cred;
int flags;
int nameiop = cnp->cn_nameiop;
- struct proc *p = cnp->cn_proc;
cnp->cn_flags &= ~PDIRUNLOCK;
flags = cnp->cn_flags;
@@ -564,12 +563,12 @@ found:
cnp->cn_flags |= PDIRUNLOCK;
error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp);
if (error) {
- if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p) == 0)
+ if (vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY) == 0)
cnp->cn_flags &= ~PDIRUNLOCK;
return (error);
}
if (lockparent && (flags & ISLASTCN)) {
- if ((error = vn_lock(pdp, LK_EXCLUSIVE, p))) {
+ if ((error = vn_lock(pdp, LK_EXCLUSIVE))) {
vput(tdp);
return (error);
}
@@ -782,7 +781,7 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp,
VOP_UNLOCK(tvp);
error = VOP_FSYNC(dvp, p->p_ucred, MNT_WAIT, p);
if (tvp != NULL)
- vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
return (error);
}
error = VOP_BWRITE(bp);
@@ -926,7 +925,7 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp,
ufsdirhash_dirtrunc(dp, dp->i_endoff);
#endif
if (tvp != NULL)
- vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
}
return (error);
}
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 37c3af267bd..1e8b3b0db80 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_quota.c,v 1.42 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ufs_quota.c,v 1.43 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */
/*
@@ -838,7 +838,6 @@ dqget(struct vnode *vp, u_long id, struct ufsmount *ump, int type,
struct dquot **dqp)
{
SIPHASH_CTX ctx;
- struct proc *p = curproc;
struct dquot *dq;
struct dqhash *dqh;
struct vnode *dqvp;
@@ -899,7 +898,7 @@ dqget(struct vnode *vp, u_long id, struct ufsmount *ump, int type,
* Initialize the contents of the dquot structure.
*/
if (vp != dqvp)
- vn_lock(dqvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(dqvp, LK_EXCLUSIVE | LK_RETRY);
LIST_INSERT_HEAD(dqh, dq, dq_hash);
dqref(dq);
dq->dq_flags = DQ_LOCK;
@@ -978,7 +977,6 @@ dqrele(struct vnode *vp, struct dquot *dq)
int
dqsync(struct vnode *vp, struct dquot *dq)
{
- struct proc *p = curproc;
struct vnode *dqvp;
struct iovec aiov;
struct uio auio;
@@ -992,7 +990,7 @@ dqsync(struct vnode *vp, struct dquot *dq)
panic("dqsync: file");
if (vp != dqvp)
- vn_lock(dqvp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(dqvp, LK_EXCLUSIVE | LK_RETRY);
while (dq->dq_flags & DQ_LOCK) {
dq->dq_flags |= DQ_WANT;
(void) tsleep(dq, PINOD+2, "dqsync", 0);
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 4b6c210c131..d5ba1c40c53 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_vnops.c,v 1.137 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.138 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -630,7 +630,6 @@ ufs_link(void *v)
struct vnode *dvp = ap->a_dvp;
struct vnode *vp = ap->a_vp;
struct componentname *cnp = ap->a_cnp;
- struct proc *p = cnp->cn_proc;
struct inode *ip;
struct direct newdir;
int error;
@@ -649,7 +648,7 @@ ufs_link(void *v)
error = EXDEV;
goto out2;
}
- if (dvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE, p))) {
+ if (dvp != vp && (error = vn_lock(vp, LK_EXCLUSIVE))) {
VOP_ABORTOP(dvp, cnp);
goto out2;
}
@@ -725,7 +724,6 @@ ufs_rename(void *v)
struct vnode *fdvp = ap->a_fdvp;
struct componentname *tcnp = ap->a_tcnp;
struct componentname *fcnp = ap->a_fcnp;
- struct proc *p = fcnp->cn_proc;
struct inode *ip, *xp, *dp;
struct direct newdir;
int doingdirectory = 0, oldparent = 0, newparent = 0;
@@ -803,7 +801,7 @@ abortit:
return (VOP_REMOVE(fdvp, fvp, fcnp));
}
- if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0)
+ if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto abortit;
/* fvp, tdvp, tvp now locked */
@@ -1115,7 +1113,7 @@ out:
vrele(fdvp);
if (doingdirectory)
ip->i_flag &= ~IN_RENAME;
- if (vn_lock(fvp, LK_EXCLUSIVE, p) == 0) {
+ if (vn_lock(fvp, LK_EXCLUSIVE) == 0) {
ip->i_effnlink--;
DIP_ADD(ip, nlink, -1);
ip->i_flag |= IN_CHANGE;
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index c626b4082dc..8ccfd3980f9 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.101 2018/04/28 03:13:05 visa Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.102 2018/05/02 02:24:56 visa Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*
@@ -1185,7 +1185,7 @@ uvn_io(struct uvm_vnode *uvn, vm_page_t *pps, int npages, int flags, int rw)
*/
result = 0;
if ((uvn->u_flags & UVM_VNODE_VNISLOCKED) == 0)
- result = vn_lock(vn, LK_EXCLUSIVE | LK_RECURSEFAIL, curproc);
+ result = vn_lock(vn, LK_EXCLUSIVE | LK_RECURSEFAIL);
if (result == 0) {
/* NOTE: vnode now locked! */
@@ -1325,7 +1325,7 @@ uvm_vnp_uncache(struct vnode *vp)
*/
VOP_UNLOCK(vp);
uvn_detach(&uvn->u_obj);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
return(TRUE);
}