summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/vdsp.c16
-rw-r--r--sys/dev/diskmap.c4
-rw-r--r--sys/dev/usb/uvideo.c4
-rw-r--r--sys/dev/vnd.c6
-rw-r--r--sys/isofs/cd9660/cd9660_lookup.c6
-rw-r--r--sys/isofs/cd9660/cd9660_node.c4
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c8
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c4
-rw-r--r--sys/isofs/udf/udf_vfsops.c10
-rw-r--r--sys/isofs/udf/udf_vnops.c8
-rw-r--r--sys/kern/exec_script.c4
-rw-r--r--sys/kern/init_main.c4
-rw-r--r--sys/kern/kern_acct.c4
-rw-r--r--sys/kern/kern_descrip.c4
-rw-r--r--sys/kern/kern_exec.c4
-rw-r--r--sys/kern/kern_ktrace.c4
-rw-r--r--sys/kern/kern_sig.c8
-rw-r--r--sys/kern/spec_vnops.c18
-rw-r--r--sys/kern/tty.c4
-rw-r--r--sys/kern/tty_pty.c8
-rw-r--r--sys/kern/tty_tty.c8
-rw-r--r--sys/kern/uipc_usrreq.c4
-rw-r--r--sys/kern/vfs_cache.c6
-rw-r--r--sys/kern/vfs_getcwd.c4
-rw-r--r--sys/kern/vfs_lookup.c14
-rw-r--r--sys/kern/vfs_subr.c8
-rw-r--r--sys/kern/vfs_sync.c4
-rw-r--r--sys/kern/vfs_syscalls.c28
-rw-r--r--sys/kern/vfs_vnops.c10
-rw-r--r--sys/kern/vfs_vops.c5
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c12
-rw-r--r--sys/miscfs/fuse/fuse_lookup.c8
-rw-r--r--sys/miscfs/fuse/fuse_vnops.c19
-rw-r--r--sys/msdosfs/msdosfs_denode.c4
-rw-r--r--sys/msdosfs/msdosfs_lookup.c12
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c14
-rw-r--r--sys/msdosfs/msdosfs_vnops.c24
-rw-r--r--sys/nfs/nfs_node.c4
-rw-r--r--sys/nfs/nfs_serv.c10
-rw-r--r--sys/nfs/nfs_subs.c4
-rw-r--r--sys/nfs/nfs_vnops.c12
-rw-r--r--sys/ntfs/ntfs_vfsops.c8
-rw-r--r--sys/ntfs/ntfs_vnops.c8
-rw-r--r--sys/sys/vnode.h5
-rw-r--r--sys/tmpfs/tmpfs_vnops.c30
-rw-r--r--sys/ufs/ext2fs/ext2fs_inode.c4
-rw-r--r--sys/ufs/ext2fs/ext2fs_lookup.c12
-rw-r--r--sys/ufs/ext2fs/ext2fs_vfsops.c12
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c16
-rw-r--r--sys/ufs/ffs/ffs_softdep.c6
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c18
-rw-r--r--sys/ufs/mfs/mfs_vnops.c4
-rw-r--r--sys/ufs/ufs/ufs_inode.c4
-rw-r--r--sys/ufs/ufs/ufs_lookup.c16
-rw-r--r--sys/ufs/ufs/ufs_quota.c10
-rw-r--r--sys/ufs/ufs/ufs_vnops.c18
-rw-r--r--sys/uvm/uvm_vnode.c6
57 files changed, 260 insertions, 263 deletions
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c
index 70a00bedd85..fc00aba0042 100644
--- a/sys/arch/sparc64/dev/vdsp.c
+++ b/sys/arch/sparc64/dev/vdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsp.c,v 1.41 2015/12/29 04:46:28 mmcc Exp $ */
+/* $OpenBSD: vdsp.c,v 1.42 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2009, 2011, 2014 Mark Kettenis
*
@@ -941,7 +941,7 @@ vdsp_open(void *arg1)
sc->sc_vdisk_size = va.va_size / DEV_BSIZE;
}
- VOP_UNLOCK(nd.ni_vp, 0, p);
+ VOP_UNLOCK(nd.ni_vp, p);
sc->sc_vp = nd.ni_vp;
vdsp_readlabel(sc);
@@ -1013,7 +1013,7 @@ vdsp_readlabel(struct vdsp_softc *sc)
vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
err = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
if (err) {
free(sc->sc_label, M_DEVBUF, 0);
sc->sc_label = NULL;
@@ -1043,7 +1043,7 @@ vdsp_writelabel(struct vdsp_softc *sc)
vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
err = VOP_WRITE(sc->sc_vp, &uio, 0, p->p_ucred);
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
return (err);
}
@@ -1074,7 +1074,7 @@ vdsp_is_iso(struct vdsp_softc *sc)
vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
err = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
if (err == 0 && memcmp(vdp->id, ISO_STANDARD_ID, sizeof(vdp->id)))
err = ENOENT;
@@ -1153,7 +1153,7 @@ vdsp_read_desc(struct vdsp_softc *sc, struct vdsk_desc_msg *dm)
vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
dm->status = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
KERNEL_UNLOCK();
if (dm->status == 0) {
@@ -1227,7 +1227,7 @@ vdsp_read_dring(void *arg1, void *arg2)
vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
vd->status = VOP_READ(sc->sc_vp, &uio, 0, p->p_ucred);
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
KERNEL_UNLOCK();
if (vd->status == 0) {
@@ -1326,7 +1326,7 @@ vdsp_write_dring(void *arg1, void *arg2)
vn_lock(sc->sc_vp, LK_EXCLUSIVE | LK_RETRY, p);
vd->status = VOP_WRITE(sc->sc_vp, &uio, 0, p->p_ucred);
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
fail:
free(buf, M_DEVBUF, 0);
diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c
index d17485f35a1..d99591e1857 100644
--- a/sys/dev/diskmap.c
+++ b/sys/dev/diskmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskmap.c,v 1.13 2015/11/20 16:06:53 deraadt Exp $ */
+/* $OpenBSD: diskmap.c,v 1.14 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org>
@@ -116,7 +116,7 @@ diskmapioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
fp->f_rbytes = 0;
fp->f_wbytes = 0;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
FRELE(fp, p);
fdpunlock(fdp);
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index 69576a1c1e9..c6bf640a80c 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.183 2015/12/20 10:08:05 mpi Exp $ */
+/* $OpenBSD: uvideo.c,v 1.184 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -2775,7 +2775,7 @@ uvideo_debug_file_open(struct uvideo_softc *sc)
}
sc->sc_vp = nd.ni_vp;
- VOP_UNLOCK(sc->sc_vp, 0, p);
+ VOP_UNLOCK(sc->sc_vp, p);
if (nd.ni_vp->v_type != VREG) {
vn_close(nd.ni_vp, FWRITE, p->p_ucred, p);
return (EIO);
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 7a294d5bc16..1616dc39efc 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.157 2015/08/26 22:36:18 deraadt Exp $ */
+/* $OpenBSD: vnd.c,v 1.158 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -459,14 +459,14 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
else {
error = VOP_GETATTR(nd.ni_vp, &vattr, p->p_ucred, p);
if (error) {
- VOP_UNLOCK(nd.ni_vp, 0, p);
+ VOP_UNLOCK(nd.ni_vp, p);
vn_close(nd.ni_vp, VNDRW(sc), p->p_ucred, p);
disk_unlock(&sc->sc_dk);
return (error);
}
sc->sc_size = vattr.va_size / sc->sc_secsize;
}
- VOP_UNLOCK(nd.ni_vp, 0, p);
+ VOP_UNLOCK(nd.ni_vp, p);
sc->sc_vp = nd.ni_vp;
if ((error = vndsetcred(sc, p->p_ucred)) != 0) {
(void) vn_close(nd.ni_vp, VNDRW(sc), p->p_ucred, p);
diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c
index 5ddc79bd0b0..c14cec3e7a2 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.23 2015/03/14 03:38:50 jsg Exp $ */
+/* $OpenBSD: cd9660_lookup.c,v 1.24 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */
/*-
@@ -377,7 +377,7 @@ found:
*/
if (flags & ISDOTDOT) {
brelse(bp);
- VOP_UNLOCK(pdp, 0, p); /* race to get the inode */
+ VOP_UNLOCK(pdp, p); /* race to get the inode */
cnp->cn_flags |= PDIRUNLOCK;
error = cd9660_vget_internal(vdp->v_mount, dp->i_ino, &tdp,
dp->i_ino != ino, NULL);
@@ -405,7 +405,7 @@ found:
if (error)
return (error);
if (!lockparent || !(flags & ISLASTCN)) {
- VOP_UNLOCK(pdp, 0, p);
+ VOP_UNLOCK(pdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
*vpp = tdp;
diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c
index 23d50a13abc..5d08d12a5e5 100644
--- a/sys/isofs/cd9660/cd9660_node.c
+++ b/sys/isofs/cd9660/cd9660_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_node.c,v 1.29 2015/03/14 03:38:50 jsg Exp $ */
+/* $OpenBSD: cd9660_node.c,v 1.30 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */
/*-
@@ -194,7 +194,7 @@ cd9660_inactive(v)
#endif
ip->i_flag = 0;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/*
* If we are done with the inode, reclaim it
* so that it can be reused immediately.
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index 3aef062b318..f1fcac5f3e4 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.75 2016/03/17 18:52:31 bluhm Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.76 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
@@ -190,7 +190,7 @@ cd9660_mount(mp, path, data, ndp, p)
vput(devvp);
return (error);
}
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
}
if ((mp->mnt_flag & MNT_UPDATE) == 0)
error = iso_mountfs(devvp, mp, p, &args);
@@ -261,7 +261,7 @@ iso_mountfs(devvp, mp, p, argp)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
@@ -452,7 +452,7 @@ out:
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (isomp) {
free((caddr_t)isomp, M_ISOFSMNT, 0);
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 3abda09af54..771d399633d 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vnops.c,v 1.74 2016/01/19 19:11:21 stefan Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.75 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
@@ -708,7 +708,7 @@ cd9660_unlock(void *v)
struct vop_unlock_args *ap = v;
struct vnode *vp = ap->a_vp;
- return (lockmgr(&VTOI(vp)->i_lock, ap->a_flags | LK_RELEASE, NULL));
+ return (lockmgr(&VTOI(vp)->i_lock, LK_RELEASE, NULL));
}
/*
diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c
index 709b7ba327c..88a4dd3d7ee 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.47 2016/03/17 18:52:31 bluhm Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.48 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -171,7 +171,7 @@ udf_mount(struct mount *mp, const char *path, void *data,
if (p->p_ucred->cr_uid) {
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, VREAD, p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error) {
vrele(devvp);
return (error);
@@ -251,7 +251,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, uint32_t lb, struct proc *p)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
@@ -453,7 +453,7 @@ bail:
vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
VOP_CLOSE(devvp, FREAD, FSCRED, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
return (error);
}
@@ -477,7 +477,7 @@ udf_unmount(struct mount *mp, int mntflags, struct proc *p)
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
vinvalbuf(devvp, V_SAVE, NOCRED, p, 0, 0);
error = VOP_CLOSE(devvp, FREAD, NOCRED, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c
index 7ac54416910..926ec8bd792 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.62 2016/02/02 16:44:44 stefan Exp $ */
+/* $OpenBSD: udf_vnops.c,v 1.63 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -911,7 +911,7 @@ udf_unlock(void *v)
struct vnode *vp = ap->a_vp;
- return (lockmgr(&VTOU(vp)->u_lock, ap->a_flags | LK_RELEASE, NULL));
+ return (lockmgr(&VTOU(vp)->u_lock, LK_RELEASE, NULL));
}
int
@@ -1105,7 +1105,7 @@ lookloop:
nchstats.ncs_pass2++;
if (!(flags & LOCKPARENT) || !(flags & ISLASTCN)) {
ap->a_cnp->cn_flags |= PDIRUNLOCK;
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
}
*vpp = tdp;
@@ -1152,7 +1152,7 @@ udf_inactive(void *v)
/*
* No need to sync anything, so just unlock the vnode and return.
*/
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return (0);
}
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index 214c5566430..c44cbf53892 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_script.c,v 1.37 2015/12/31 18:55:33 mmcc Exp $ */
+/* $OpenBSD: exec_script.c,v 1.38 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */
/*
@@ -165,7 +165,7 @@ check_shell:
*/
vn_lock(scriptvp, LK_EXCLUSIVE|LK_RETRY, p);
error = VOP_ACCESS(scriptvp, VREAD, p->p_ucred, p);
- VOP_UNLOCK(scriptvp, 0, p);
+ VOP_UNLOCK(scriptvp, p);
if (error == EACCES || script_sbits) {
struct file *fp;
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 7f1f7a141d0..312bd87e1ea 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.248 2016/01/03 00:15:59 jsg Exp $ */
+/* $OpenBSD: init_main.c,v 1.249 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -477,7 +477,7 @@ main(void *framep)
panic("cannot find root vnode");
p->p_fd->fd_cdir = rootvnode;
vref(p->p_fd->fd_cdir);
- VOP_UNLOCK(rootvnode, 0, p);
+ VOP_UNLOCK(rootvnode, p);
p->p_fd->fd_rdir = NULL;
/*
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index d0af479b3e9..7c339ab1577 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_acct.c,v 1.31 2016/03/14 23:08:06 krw Exp $ */
+/* $OpenBSD: kern_acct.c,v 1.32 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */
/*-
@@ -116,7 +116,7 @@ sys_acct(struct proc *p, void *v, register_t *retval)
p);
if ((error = vn_open(&nd, FWRITE|O_APPEND, 0)) != 0)
return (error);
- VOP_UNLOCK(nd.ni_vp, 0, p);
+ VOP_UNLOCK(nd.ni_vp, p);
if (nd.ni_vp->v_type != VREG) {
vn_close(nd.ni_vp, FWRITE, p->p_ucred, p);
return (EACCES);
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 33153e97f33..1af3e946c60 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.128 2016/01/06 17:59:30 tedu Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.129 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -752,7 +752,7 @@ sys_fpathconf(struct proc *p, void *v, register_t *retval)
vp = fp->f_data;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_PATHCONF(vp, SCARG(uap, name), retval);
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
break;
default:
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index c1bf506d44b..b9017510b1a 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.174 2016/03/06 20:25:27 guenther Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.175 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -164,7 +164,7 @@ check_exec(struct proc *p, struct exec_package *epp)
goto bad1;
/* unlock vp, we need it unlocked from here */
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/* now we have the file, get the exec header */
error = vn_rdwr(UIO_READ, vp, epp->ep_hdr, epp->ep_hdrlen, 0,
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 72e67b9501d..97c1074334a 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_ktrace.c,v 1.87 2016/03/06 20:25:27 guenther Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.88 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
@@ -428,7 +428,7 @@ sys_ktrace(struct proc *p, void *v, register_t *retval)
goto done;
vp = nd.ni_vp;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if (vp->v_type != VREG) {
error = EACCES;
goto done;
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index e212ea40b68..4e08257cc63 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.193 2016/03/09 13:38:50 mpi Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.194 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -1608,7 +1608,7 @@ coredump(struct proc *p)
*/
vp = nd.ni_vp;
if ((error = VOP_GETATTR(vp, &vattr, cred, p)) != 0) {
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
vn_close(vp, FWRITE, cred, p);
goto out;
}
@@ -1616,7 +1616,7 @@ coredump(struct proc *p)
vattr.va_mode & ((VREAD | VWRITE) >> 3 | (VREAD | VWRITE) >> 6) ||
vattr.va_uid != cred->cr_uid) {
error = EACCES;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
vn_close(vp, FWRITE, cred, p);
goto out;
}
@@ -1629,7 +1629,7 @@ coredump(struct proc *p)
io.io_vp = vp;
io.io_cred = cred;
io.io_offset = 0;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
vref(vp);
error = vn_close(vp, FWRITE, cred, p);
if (error == 0)
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index ec27ed7f142..265a558d4b5 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.85 2016/01/19 19:13:38 stefan Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.86 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -154,7 +154,7 @@ spec_open(void *v)
vp->v_flag |= VISTTY;
if (cdevsw[maj].d_flags & D_CLONE)
return (spec_open_clone(ap));
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = (*cdevsw[maj].d_open)(dev, ap->a_mode, S_IFCHR, p);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
return (error);
@@ -219,7 +219,7 @@ spec_read(void *v)
switch (vp->v_type) {
case VCHR:
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = (*cdevsw[major(vp->v_rdev)].d_read)
(vp->v_rdev, uio, ap->a_ioflag);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
@@ -273,7 +273,7 @@ spec_inactive(void *v)
{
struct vop_inactive_args *ap = v;
- VOP_UNLOCK(ap->a_vp, 0, ap->a_p);
+ VOP_UNLOCK(ap->a_vp, ap->a_p);
return (0);
}
@@ -306,7 +306,7 @@ spec_write(void *v)
switch (vp->v_type) {
case VCHR:
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = (*cdevsw[major(vp->v_rdev)].d_write)
(vp->v_rdev, uio, ap->a_ioflag);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
@@ -525,7 +525,7 @@ spec_close(void *v)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(vp, V_SAVE, ap->a_cred, p, 0, 0);
if (!(vp->v_flag & VXLOCK))
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if (error)
return (error);
/*
@@ -550,7 +550,7 @@ spec_close(void *v)
/* release lock if held and this isn't coming from vclean() */
relock = VOP_ISLOCKED(vp) && !(vp->v_flag & VXLOCK);
if (relock)
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = (*devclose)(dev, ap->a_fflag, mode, p);
if (relock)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
@@ -582,7 +582,7 @@ spec_setattr(void *v)
vn_lock(vp->v_specparent, LK_EXCLUSIVE|LK_RETRY, p);
error = VOP_SETATTR(vp->v_specparent, ap->a_vap, ap->a_cred, p);
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return (error);
}
@@ -723,7 +723,7 @@ spec_open_clone(struct vop_open_args *ap)
return (error); /* out of vnodes */
}
- VOP_UNLOCK(vp, 0, ap->a_p);
+ VOP_UNLOCK(vp, ap->a_p);
error = cdevsw[major(vp->v_rdev)].d_open(cvp->v_rdev, ap->a_mode,
S_IFCHR, ap->a_p);
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 92430eb22f1..8a02edb030d 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.129 2016/01/28 18:02:36 stefan Exp $ */
+/* $OpenBSD: tty.c,v 1.130 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -803,7 +803,7 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
return (error);
vn_lock(nid.ni_vp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(nid.ni_vp, VREAD, p->p_ucred, p);
- VOP_UNLOCK(nid.ni_vp, 0, p);
+ VOP_UNLOCK(nid.ni_vp, p);
vrele(nid.ni_vp);
if (error)
return (error);
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 578f273f3fe..c151fc711b1 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.76 2016/01/28 18:02:36 stefan Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.77 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -1112,7 +1112,7 @@ retry:
cfp->f_type = DTYPE_VNODE;
cfp->f_ops = &vnops;
cfp->f_data = (caddr_t) cnd.ni_vp;
- VOP_UNLOCK(cnd.ni_vp, 0, p);
+ VOP_UNLOCK(cnd.ni_vp, p);
/*
* Open the slave.
@@ -1146,7 +1146,7 @@ retry:
goto bad;
}
}
- VOP_UNLOCK(snd.ni_vp, 0, p);
+ VOP_UNLOCK(snd.ni_vp, p);
if (snd.ni_vp->v_usecount > 1 ||
(snd.ni_vp->v_flag & (VALIASED)))
VOP_REVOKE(snd.ni_vp, REVOKEALL);
@@ -1167,7 +1167,7 @@ retry:
sfp->f_type = DTYPE_VNODE;
sfp->f_ops = &vnops;
sfp->f_data = (caddr_t) snd.ni_vp;
- VOP_UNLOCK(snd.ni_vp, 0, p);
+ VOP_UNLOCK(snd.ni_vp, p);
/* now, put the indexen and names into struct ptmget */
ptm->cfd = cindx;
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 535bf9a0f7b..b5ed8384361 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_tty.c,v 1.17 2015/12/05 10:11:53 tedu Exp $ */
+/* $OpenBSD: tty_tty.c,v 1.18 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */
/*-
@@ -59,7 +59,7 @@ cttyopen(dev_t dev, int flag, int mode, struct proc *p)
return (ENXIO);
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_OPEN(ttyvp, flag, NOCRED, p);
- VOP_UNLOCK(ttyvp, 0, p);
+ VOP_UNLOCK(ttyvp, p);
return (error);
}
@@ -74,7 +74,7 @@ cttyread(dev_t dev, struct uio *uio, int flag)
return (EIO);
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_READ(ttyvp, uio, flag, NOCRED);
- VOP_UNLOCK(ttyvp, 0, p);
+ VOP_UNLOCK(ttyvp, p);
return (error);
}
@@ -89,7 +89,7 @@ cttywrite(dev_t dev, struct uio *uio, int flag)
return (EIO);
vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_WRITE(ttyvp, uio, flag, NOCRED);
- VOP_UNLOCK(ttyvp, 0, p);
+ VOP_UNLOCK(ttyvp, p);
return (error);
}
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 17ac3e58c88..1f06ea0ca4e 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.95 2015/12/05 10:11:53 tedu Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.96 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -468,7 +468,7 @@ unp_bind(struct unpcb *unp, struct mbuf *nam, struct proc *p)
unp->unp_connid.gid = p->p_ucred->cr_gid;
unp->unp_connid.pid = p->p_p->ps_pid;
unp->unp_flags |= UNP_FEIDSBIND;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return (0);
}
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 973cda3d7fd..6a6e7257073 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cache.c,v 1.48 2016/03/07 18:43:59 naddy Exp $ */
+/* $OpenBSD: vfs_cache.c,v 1.49 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */
/*
@@ -202,7 +202,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp,
vref(dvp);
error = 0;
} else if (cnp->cn_flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
error = vget(vp, LK_EXCLUSIVE, p);
/*
@@ -223,7 +223,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp,
* ISLASTCN is set, unlock the directory vnode.
*/
if (error || (~cnp->cn_flags & (LOCKPARENT|ISLASTCN)) != 0) {
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
}
diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c
index 818718a8e97..349d6aa1ffd 100644
--- a/sys/kern/vfs_getcwd.c
+++ b/sys/kern/vfs_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_getcwd.c,v 1.25 2015/03/14 03:38:51 jsg Exp $ */
+/* $OpenBSD: vfs_getcwd.c,v 1.26 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*
@@ -226,7 +226,7 @@ vfs_getcwd_getcache(struct vnode **lvpp, struct vnode **uvpp, char **bpp,
/* Release current lock before acquiring the parent lock */
- VOP_UNLOCK(lvp, 0, p);
+ VOP_UNLOCK(lvp, p);
error = vget(uvp, LK_EXCLUSIVE | LK_RETRY, p);
if (error)
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 2d66aeff3a9..a8611b212cf 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lookup.c,v 1.59 2015/11/02 16:31:55 semarie Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.60 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
@@ -216,7 +216,7 @@ fail:
return (0);
}
if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_flags & ISLASTCN))
- VOP_UNLOCK(ndp->ni_dvp, 0, p);
+ VOP_UNLOCK(ndp->ni_dvp, p);
if (ndp->ni_loopcnt++ >= SYMLOOP_MAX) {
error = ELOOP;
break;
@@ -547,7 +547,7 @@ dirloop:
(cnp->cn_flags & NOCROSSMOUNT) == 0) {
if (vfs_busy(mp, VB_READ|VB_WAIT))
continue;
- VOP_UNLOCK(dp, 0, p);
+ VOP_UNLOCK(dp, p);
error = VFS_ROOT(mp, &tdp);
vfs_unbusy(mp);
if (error) {
@@ -614,13 +614,13 @@ terminal:
vrele(ndp->ni_dvp);
}
if ((cnp->cn_flags & LOCKLEAF) == 0)
- VOP_UNLOCK(dp, 0, p);
+ VOP_UNLOCK(dp, p);
return (0);
bad2:
if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_flags & ISLASTCN) &&
((cnp->cn_flags & PDIRUNLOCK) == 0))
- VOP_UNLOCK(ndp->ni_dvp, 0, p);
+ VOP_UNLOCK(ndp->ni_dvp, p);
vrele(ndp->ni_dvp);
bad:
if (dpunlocked)
@@ -748,12 +748,12 @@ vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
if (!wantparent)
vrele(dvp);
if ((cnp->cn_flags & LOCKLEAF) == 0)
- VOP_UNLOCK(dp, 0, p);
+ VOP_UNLOCK(dp, p);
return (0);
bad2:
if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_flags & ISLASTCN))
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
vrele(dvp);
bad:
vput(dp);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 56f037c98d0..966e8977f9c 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.239 2016/03/14 23:08:06 krw Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.240 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -576,7 +576,7 @@ loop:
* The vnodes created by bdevvp should not be aliased (why?).
*/
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
vclean(vp, 0, p);
vp->v_op = nvp->v_op;
vp->v_tag = nvp->v_tag;
@@ -707,7 +707,7 @@ vput(struct vnode *vp)
#endif
vp->v_usecount--;
if (vp->v_usecount > 0) {
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return;
}
@@ -974,7 +974,7 @@ vclean(struct vnode *vp, int flags, struct proc *p)
* Any other processes trying to obtain this lock must first
* wait for VXLOCK to clear, then call the new lock operation.
*/
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
}
/*
diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c
index 2f77f656b66..b49bb47b92e 100644
--- a/sys/kern/vfs_sync.c
+++ b/sys/kern/vfs_sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_sync.c,v 1.54 2015/03/14 03:38:51 jsg Exp $ */
+/* $OpenBSD: vfs_sync.c,v 1.55 2016/03/19 12:04:15 natano Exp $ */
/*
* Portions of this code are:
@@ -360,7 +360,7 @@ sync_inactive(void *v)
int s;
if (vp->v_usecount == 0) {
- VOP_UNLOCK(vp, 0, ap->a_p);
+ VOP_UNLOCK(vp, ap->a_p);
return (0);
}
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 094097c99fb..559d0b50c8d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.251 2016/01/06 17:59:30 tedu Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.252 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -297,7 +297,7 @@ update:
vfsp->vfc_refcount++;
TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);
checkdirs(vp);
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if ((mp->mnt_flag & MNT_RDONLY) == 0)
error = vfs_allocate_syncvnode(mp);
vfs_unbusy(mp);
@@ -705,7 +705,7 @@ sys_fchdir(struct proc *p, void *v, register_t *retval)
vput(vp);
return (error);
}
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
old_cdir = fdp->fd_cdir;
fdp->fd_cdir = vp;
vrele(old_cdir);
@@ -793,7 +793,7 @@ change_dir(struct nameidata *ndp, struct proc *p)
if (error)
vput(vp);
else
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return (error);
}
@@ -905,7 +905,7 @@ doopenat(struct proc *p, int fd, const char *path, int oflags, mode_t mode,
type = F_FLOCK;
if ((flags & FNONBLOCK) == 0)
type |= F_WAIT;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
if (error) {
/* closef will vn_close the file for us. */
@@ -929,14 +929,14 @@ doopenat(struct proc *p, int fd, const char *path, int oflags, mode_t mode,
error = VOP_SETATTR(vp, &vattr, fp->f_cred, p);
}
if (error) {
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/* closef will close the file for us. */
fdremove(fdp, indx);
closef(fp, p);
goto out;
}
}
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
*retval = indx;
FILE_SET_MATURE(fp, p);
out:
@@ -1089,7 +1089,7 @@ sys_fhopen(struct proc *p, void *v, register_t *retval)
type = F_FLOCK;
if ((flags & FNONBLOCK) == 0)
type |= F_WAIT;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type);
if (error) {
vp = NULL; /* closef will vn_close the file */
@@ -1098,7 +1098,7 @@ sys_fhopen(struct proc *p, void *v, register_t *retval)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
fp->f_iflags |= FIF_HASLOCK;
}
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
*retval = indx;
FILE_SET_MATURE(fp, p);
@@ -2040,7 +2040,7 @@ sys_fchmod(struct proc *p, void *v, register_t *retval)
vattr.va_mode = mode & ALLPERMS;
error = VOP_SETATTR(vp, &vattr, p->p_ucred, p);
}
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
FRELE(fp, p);
return (error);
}
@@ -2218,7 +2218,7 @@ sys_fchown(struct proc *p, void *v, register_t *retval)
error = VOP_SETATTR(vp, &vattr, p->p_ucred, p);
}
out:
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
FRELE(fp, p);
return (error);
}
@@ -2484,7 +2484,7 @@ sys_ftruncate(struct proc *p, void *v, register_t *retval)
vattr.va_size = len;
error = VOP_SETATTR(vp, &vattr, fp->f_cred, p);
}
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
bad:
FRELE(fp, p);
return (error);
@@ -2513,7 +2513,7 @@ sys_fsync(struct proc *p, void *v, register_t *retval)
error = softdep_fsync(vp);
#endif
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
FRELE(fp, p);
return (error);
}
@@ -2749,7 +2749,7 @@ sys_getdents(struct proc *p, void *v, register_t *retval)
auio.uio_offset = fp->f_offset;
error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag);
fp->f_offset = auio.uio_offset;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if (error)
goto bad;
*retval = buflen - auio.uio_resid;
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 16655c6c72a..08f5f998d32 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.83 2016/01/06 17:59:30 tedu Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.84 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -171,7 +171,7 @@ vn_open(struct nameidata *ndp, int fmode, int cmode)
ndp->ni_vp = cip->ci_vp; /* return cloned vnode */
vp->v_data = cip->ci_data; /* restore v_data */
- VOP_UNLOCK(vp, 0, p); /* keep a reference */
+ VOP_UNLOCK(vp, p); /* keep a reference */
vp = ndp->ni_vp; /* for the increment below */
free(cip, M_TEMP, sizeof(*cip));
@@ -311,7 +311,7 @@ vn_rdwr(enum uio_rw rw, struct vnode *vp, caddr_t base, int len, off_t offset,
error = VOP_WRITE(vp, &auio, ioflg, cred);
}
if ((ioflg & IO_NODELOCKED) == 0)
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if (aresid)
*aresid = auio.uio_resid;
@@ -342,7 +342,7 @@ vn_read(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
error = VOP_READ(vp, uio,
(fp->f_flag & FNONBLOCK) ? IO_NDELAY : 0, cred);
*poff += count - uio->uio_resid;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return (error);
}
@@ -374,7 +374,7 @@ vn_write(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
*poff = uio->uio_offset;
else
*poff += count - uio->uio_resid;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
return (error);
}
diff --git a/sys/kern/vfs_vops.c b/sys/kern/vfs_vops.c
index c3991b7dfbe..5941466ad32 100644
--- a/sys/kern/vfs_vops.c
+++ b/sys/kern/vfs_vops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vops.c,v 1.14 2015/07/19 16:21:11 beck Exp $ */
+/* $OpenBSD: vfs_vops.c,v 1.15 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
@@ -517,11 +517,10 @@ VOP_LOCK(struct vnode *vp, int flags, struct proc *p)
}
int
-VOP_UNLOCK(struct vnode *vp, int flags, struct proc *p)
+VOP_UNLOCK(struct vnode *vp, struct proc *p)
{
struct vop_unlock_args a;
a.a_vp = vp;
- a.a_flags = flags;
a.a_p = p;
if (vp->v_op->vop_unlock == NULL)
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index c8383d754b1..c1e386f719a 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.49 2015/09/01 07:17:57 deraadt Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.50 2016/03/19 12:04:15 natano Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -176,7 +176,7 @@ fifo_open(void *v)
}
if ((ap->a_mode & O_NONBLOCK) == 0) {
if ((ap->a_mode & FREAD) && fip->fi_writers == 0) {
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = tsleep(&fip->fi_readers,
PCATCH | PSOCK, "fifor", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
@@ -184,7 +184,7 @@ fifo_open(void *v)
goto bad;
}
if ((ap->a_mode & FWRITE) && fip->fi_readers == 0) {
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = tsleep(&fip->fi_writers,
PCATCH | PSOCK, "fifow", 0);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
@@ -219,7 +219,7 @@ fifo_read(void *v)
return (0);
if (ap->a_ioflag & IO_NDELAY)
rso->so_state |= SS_NBIO;
- VOP_UNLOCK(ap->a_vp, 0, p);
+ VOP_UNLOCK(ap->a_vp, p);
error = soreceive(rso, NULL, uio, NULL, NULL, NULL, 0);
vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY, p);
if (ap->a_ioflag & IO_NDELAY) {
@@ -249,7 +249,7 @@ fifo_write(void *v)
#endif
if (ap->a_ioflag & IO_NDELAY)
wso->so_state |= SS_NBIO;
- VOP_UNLOCK(ap->a_vp, 0, p);
+ VOP_UNLOCK(ap->a_vp, p);
error = sosend(wso, NULL, ap->a_uio, NULL, NULL, 0);
vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY, p);
if (ap->a_ioflag & IO_NDELAY)
@@ -335,7 +335,7 @@ fifo_inactive(void *v)
{
struct vop_inactive_args *ap = v;
- VOP_UNLOCK(ap->a_vp, 0, ap->a_p);
+ VOP_UNLOCK(ap->a_vp, ap->a_p);
return (0);
}
diff --git a/sys/miscfs/fuse/fuse_lookup.c b/sys/miscfs/fuse/fuse_lookup.c
index 3267b51c0db..e9bf8bfc02c 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.10 2014/12/16 18:30:04 tedu Exp $ */
+/* $OpenBSD: fuse_lookup.c,v 1.11 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -100,7 +100,7 @@ fusefs_lookup(void *v)
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
@@ -155,7 +155,7 @@ fusefs_lookup(void *v)
}
if (flags & ISDOTDOT) {
- VOP_UNLOCK(vdp, 0, p); /* race to get the inode */
+ VOP_UNLOCK(vdp, p); /* race to get the inode */
cnp->cn_flags |= PDIRUNLOCK;
error = VFS_VGET(fmp->mp, nid, &tdp);
@@ -199,7 +199,7 @@ fusefs_lookup(void *v)
VTOI(tdp)->parent = dp->ufs_ino.i_number;
if (!lockparent || !(flags & ISLASTCN)) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c
index bea1126849a..9f19cc6ebc2 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.26 2016/01/22 17:09:43 stefan Exp $ */
+/* $OpenBSD: fuse_vnops.c,v 1.27 2016/03/19 12:04:15 natano Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -606,7 +606,7 @@ fusefs_link(void *v)
out1:
if (dvp != vp)
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
out2:
vput(dvp);
return (error);
@@ -767,7 +767,7 @@ fusefs_inactive(void *v)
error = VOP_GETATTR(vp, &vattr, cred, p);
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if (error)
vrecycle(vp, p);
@@ -1219,7 +1219,7 @@ abortit:
dp == ip ||
(fcnp->cn_flags & ISDOTDOT) ||
(tcnp->cn_flags & ISDOTDOT)) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EINVAL;
goto abortit;
}
@@ -1228,13 +1228,13 @@ abortit:
if (!fmp->sess_init) {
error = ENXIO;
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
goto abortit;
}
if (fmp->undef_op & UNDEF_RENAME) {
error = ENOSYS;
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
goto abortit;
}
@@ -1256,14 +1256,14 @@ abortit:
}
fb_delete(fbuf);
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
goto abortit;
}
fb_delete(fbuf);
VN_KNOTE(fvp, NOTE_RENAME);
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
if (tdvp == tvp)
vrele(tdvp);
else
@@ -1482,8 +1482,7 @@ fusefs_unlock(void *v)
struct vop_unlock_args *ap = v;
struct vnode *vp = ap->a_vp;
- return (lockmgr(&VTOI(vp)->ufs_ino.i_lock, ap->a_flags | LK_RELEASE,
- NULL));
+ return (lockmgr(&VTOI(vp)->ufs_ino.i_lock, LK_RELEASE, NULL));
}
int
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index cdb15695617..1009a8a6795 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_denode.c,v 1.55 2015/10/23 17:21:34 krw Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.56 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */
/*-
@@ -661,7 +661,7 @@ msdosfs_inactive(void *v)
deupdat(dep, 0);
out:
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/*
* If we are done with the denode, reclaim it
* so that it can be reused immediately.
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index ddd293482e1..fcb7f2d7a7e 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_lookup.c,v 1.29 2015/10/23 17:21:34 krw Exp $ */
+/* $OpenBSD: msdosfs_lookup.c,v 1.30 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 ws Exp $ */
/*-
@@ -400,7 +400,7 @@ notfound:;
*/
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (EJUSTRETURN);
@@ -491,7 +491,7 @@ foundroot:;
return (error);
*vpp = DETOV(tdp);
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (0);
@@ -524,7 +524,7 @@ foundroot:;
*vpp = DETOV(tdp);
cnp->cn_flags |= SAVENAME;
if (!lockparent)
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
return (0);
}
@@ -549,7 +549,7 @@ foundroot:;
*/
pdp = vdp;
if (flags & ISDOTDOT) {
- VOP_UNLOCK(pdp, 0, p); /* race to get the inode */
+ VOP_UNLOCK(pdp, p); /* 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)
@@ -572,7 +572,7 @@ foundroot:;
if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0)
return (error);
if (!lockparent || !(flags & ISLASTCN)) {
- VOP_UNLOCK(pdp, 0, p);
+ VOP_UNLOCK(pdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
*vpp = DETOV(tdp);
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index ebe94306d02..4edf1875cd6 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.74 2016/03/17 18:52:31 bluhm Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.75 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -148,7 +148,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data,
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
}
@@ -207,7 +207,7 @@ msdosfs_mount(struct mount *mp, const char *path, void *data,
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
goto error_devvp;
}
@@ -302,7 +302,7 @@ msdosfs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p,
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
@@ -584,7 +584,7 @@ error_exit:
vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
(void) VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (pmp) {
if (pmp->pm_inusemap)
@@ -706,7 +706,7 @@ msdosfs_sync_vnode(struct vnode *vp, void *arg)
if ((error = VOP_FSYNC(vp, msa->cred, msa->waitfor, msa->p)) != 0)
msa->allerror = error;
- VOP_UNLOCK(vp, 0, msa->p);
+ VOP_UNLOCK(vp, msa->p);
vrele(vp);
return (0);
@@ -748,7 +748,7 @@ msdosfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)
vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY, p);
if ((error = VOP_FSYNC(pmp->pm_devvp, cred, waitfor, p)) != 0)
msa.allerror = error;
- VOP_UNLOCK(pmp->pm_devvp, 0, p);
+ VOP_UNLOCK(pmp->pm_devvp, p);
}
return (msa.allerror);
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 35115b6876d..534b0827d69 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.108 2016/03/14 23:08:06 krw Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.109 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -1003,7 +1003,7 @@ abortit:
(fcnp->cn_flags & ISDOTDOT) ||
(tcnp->cn_flags & ISDOTDOT) ||
(ip->de_flag & DE_RENAME)) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EINVAL;
goto abortit;
}
@@ -1035,7 +1035,7 @@ abortit:
* call to doscheckpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
if (VTODE(fdvp)->de_StartCluster != VTODE(tdvp)->de_StartCluster)
newparent = 1;
vrele(fdvp);
@@ -1104,7 +1104,7 @@ abortit:
if ((fcnp->cn_flags & SAVESTART) == 0)
panic("msdosfs_rename: lost from startdir");
if (!newparent)
- VOP_UNLOCK(tdvp, 0, p);
+ VOP_UNLOCK(tdvp, p);
(void) vfs_relookup(fdvp, &fvp, fcnp);
if (fvp == NULL) {
/*
@@ -1114,7 +1114,7 @@ abortit:
panic("rename: lost dir entry");
vrele(ap->a_fvp);
if (newparent)
- VOP_UNLOCK(tdvp, 0, p);
+ VOP_UNLOCK(tdvp, p);
vrele(tdvp);
return 0;
}
@@ -1135,7 +1135,7 @@ abortit:
panic("rename: lost dir entry");
vrele(ap->a_fvp);
if (newparent)
- VOP_UNLOCK(fdvp, 0, p);
+ VOP_UNLOCK(fdvp, p);
xp = NULL;
} else {
vrele(fvp);
@@ -1157,7 +1157,7 @@ abortit:
if (error) {
bcopy(oldname, ip->de_Name, 11);
if (newparent)
- VOP_UNLOCK(fdvp, 0, p);
+ VOP_UNLOCK(fdvp, p);
goto bad;
}
ip->de_refcnt++;
@@ -1165,7 +1165,7 @@ abortit:
if ((error = removede(zp, ip)) != 0) {
/* XXX should really panic here, fs is corrupt */
if (newparent)
- VOP_UNLOCK(fdvp, 0, p);
+ VOP_UNLOCK(fdvp, p);
goto bad;
}
@@ -1177,7 +1177,7 @@ abortit:
if (error) {
/* XXX should really panic here, fs is corrupt */
if (newparent)
- VOP_UNLOCK(fdvp, 0, p);
+ VOP_UNLOCK(fdvp, p);
goto bad;
}
ip->de_diroffset = to_diroffset;
@@ -1186,7 +1186,7 @@ abortit:
}
reinsert(ip);
if (newparent)
- VOP_UNLOCK(fdvp, 0, p);
+ VOP_UNLOCK(fdvp, p);
}
/*
@@ -1225,7 +1225,7 @@ abortit:
VN_KNOTE(fvp, NOTE_RENAME);
bad:
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
vrele(fdvp);
bad1:
if (xp)
@@ -1732,7 +1732,7 @@ msdosfs_unlock(void *v)
struct vop_unlock_args *ap = v;
struct vnode *vp = ap->a_vp;
- return (lockmgr(&VTODE(vp)->de_lock, ap->a_flags | LK_RELEASE, NULL));
+ return (lockmgr(&VTODE(vp)->de_lock, LK_RELEASE, NULL));
}
int
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c
index ec6c50a0a2b..279cd736106 100644
--- a/sys/nfs/nfs_node.c
+++ b/sys/nfs/nfs_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_node.c,v 1.63 2016/02/09 00:56:04 mmcc Exp $ */
+/* $OpenBSD: nfs_node.c,v 1.64 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */
/*
@@ -202,7 +202,7 @@ nfs_inactive(void *v)
}
np->n_flag &= (NMODIFIED | NFLUSHINPROG | NFLUSHWANT);
- VOP_UNLOCK(ap->a_vp, 0, ap->a_p);
+ VOP_UNLOCK(ap->a_vp, ap->a_p);
return (0);
}
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index b9cac413104..821c71e4095 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.106 2015/08/30 02:18:28 deraadt Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.107 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -2095,7 +2095,7 @@ nfsrv_readdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
error = 0;
goto nfsmout;
}
- VOP_UNLOCK(vp, 0, procp);
+ VOP_UNLOCK(vp, procp);
rbuf = malloc(fullsiz, M_TEMP, M_WAITOK);
again:
iv.iov_base = rbuf;
@@ -2119,7 +2119,7 @@ again:
error = getret;
}
- VOP_UNLOCK(vp, 0, procp);
+ VOP_UNLOCK(vp, procp);
if (error) {
vrele(vp);
free(rbuf, M_TEMP, fullsiz);
@@ -2294,7 +2294,7 @@ nfsrv_readdirplus(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
error = 0;
goto nfsmout;
}
- VOP_UNLOCK(vp, 0, procp);
+ VOP_UNLOCK(vp, procp);
rbuf = malloc(fullsiz, M_TEMP, M_WAITOK);
again:
@@ -2315,7 +2315,7 @@ again:
off = (u_quad_t)io.uio_offset;
getret = VOP_GETATTR(vp, &at, cred, procp);
- VOP_UNLOCK(vp, 0, procp);
+ VOP_UNLOCK(vp, procp);
if (!error)
error = getret;
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 274df79bd8f..97f7d6e8352 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.129 2016/02/13 15:45:05 stefan Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.130 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1470,7 +1470,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp,
else
*rdonlyp = 0;
if (!lockflag)
- VOP_UNLOCK(*vpp, 0, p);
+ VOP_UNLOCK(*vpp, p);
return (0);
}
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index ea7e4106247..91d6359c388 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.167 2016/02/13 15:45:05 stefan Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.168 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -783,7 +783,7 @@ nfs_lookup(void *v)
cnp->cn_flags |= SAVENAME;
if ((!lockparent || !(flags & ISLASTCN)) &&
newvp != dvp)
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
return (0);
}
cache_purge(newvp);
@@ -840,7 +840,7 @@ dorpc:
m_freem(info.nmi_mrep);
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (0);
@@ -861,7 +861,7 @@ dorpc:
} else
nfsm_loadattr(newvp, NULL);
} else if (flags & ISDOTDOT) {
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
error = nfs_nget(dvp->v_mount, fhp, fhsize, &np);
@@ -901,7 +901,7 @@ dorpc:
} else
nfsm_loadattr(newvp, NULL);
if (!lockparent || !(flags & ISLASTCN)) {
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
}
@@ -931,7 +931,7 @@ nfsmout:
if (newvp != NULLVP) {
vrele(newvp);
if (newvp != dvp)
- VOP_UNLOCK(newvp, 0, p);
+ VOP_UNLOCK(newvp, p);
}
if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME) &&
(flags & ISLASTCN) && error == ENOENT) {
diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c
index cbca872b51a..e3971e950bb 100644
--- a/sys/ntfs/ntfs_vfsops.c
+++ b/sys/ntfs/ntfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vfsops.c,v 1.47 2016/03/17 18:52:31 bluhm Exp $ */
+/* $OpenBSD: ntfs_vfsops.c,v 1.48 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */
/*-
@@ -196,7 +196,7 @@ ntfs_mount(struct mount *mp, const char *path, void *data,
amode = (mp->mnt_flag & MNT_RDONLY) ? VREAD : (VREAD | VWRITE);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
err = VOP_ACCESS(devvp, amode, p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (err)
goto error_2;
}
@@ -299,7 +299,7 @@ ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp,
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
@@ -463,7 +463,7 @@ out:
/* lock the device vnode before calling VOP_CLOSE() */
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
return (error);
}
diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c
index 8916dfa2b30..2bc16a68f17 100644
--- a/sys/ntfs/ntfs_vnops.c
+++ b/sys/ntfs/ntfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vnops.c,v 1.40 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: ntfs_vnops.c,v 1.41 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
/*
@@ -192,7 +192,7 @@ ntfs_inactive(void *v)
vprint("ntfs_inactive: pushing active", vp);
#endif
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/* XXX since we don't support any filesystem changes
* right now, nothing more needs to be done
@@ -634,7 +634,7 @@ ntfs_lookup(void *v)
DPRINTF("ntfs_lookup: faking .. directory in %u\n",
dip->i_number);
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
error = ntfs_ntvattrget(ntmp, dip, NTFS_A_NAME, NULL, 0, &vap);
@@ -671,7 +671,7 @@ ntfs_lookup(void *v)
VTONT(*ap->a_vpp)->i_number);
if(!lockparent || (cnp->cn_flags & ISLASTCN) == 0) {
- VOP_UNLOCK(dvp, 0, p);
+ VOP_UNLOCK(dvp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
}
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 552a0613780..ffe8b21f74d 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.133 2015/11/03 06:25:01 guenther Exp $ */
+/* $OpenBSD: vnode.h,v 1.134 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -516,10 +516,9 @@ int VOP_LOCK(struct vnode *, int, struct proc *);
struct vop_unlock_args {
struct vnode *a_vp;
- int a_flags;
struct proc *a_p;
};
-int VOP_UNLOCK(struct vnode *, int, struct proc *);
+int VOP_UNLOCK(struct vnode *, struct proc *);
struct vop_bmap_args {
struct vnode *a_vp;
diff --git a/sys/tmpfs/tmpfs_vnops.c b/sys/tmpfs/tmpfs_vnops.c
index 404c8e4554b..f876855e25c 100644
--- a/sys/tmpfs/tmpfs_vnops.c
+++ b/sys/tmpfs/tmpfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfs_vnops.c,v 1.24 2016/02/06 16:10:23 stefan Exp $ */
+/* $OpenBSD: tmpfs_vnops.c,v 1.25 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */
/*
@@ -182,7 +182,7 @@ tmpfs_lookup(void *v)
* and thus prevents parent from disappearing.
*/
rw_enter_write(&pnode->tn_nlock);
- VOP_UNLOCK(dvp, 0, curproc);
+ VOP_UNLOCK(dvp, curproc);
/*
* Get a vnode of the '..' entry and re-acquire the lock.
@@ -295,7 +295,7 @@ out:
if ((error == 0 || error == EJUSTRETURN) && /* (1) */
*vpp != dvp && /* (2) */
(!lockparent || !lastcn)) { /* (3) */
- VOP_UNLOCK(dvp, 0, curproc);
+ VOP_UNLOCK(dvp, curproc);
cnp->cn_flags |= PDIRUNLOCK;
} else
KASSERT(VOP_ISLOCKED(dvp));
@@ -829,7 +829,7 @@ tmpfs_link(void *v)
error = 0;
out:
pool_put(&namei_pool, cnp->cn_pnbuf);
- VOP_UNLOCK(vp, 0, curproc);
+ VOP_UNLOCK(vp, curproc);
vput(dvp);
return error;
}
@@ -1041,7 +1041,7 @@ tmpfs_inactive(void *v)
if (vp->v_type == VREG && tmpfs_uio_cached(node))
tmpfs_uio_uncache(node);
- VOP_UNLOCK(vp, 0, curproc);
+ VOP_UNLOCK(vp, curproc);
/*
* If we are done with the node, reclaim it so that it can be reused
@@ -1198,7 +1198,7 @@ tmpfs_unlock(void *v)
struct vop_unlock_args *ap = v;
tmpfs_node_t *tnp = VP_TO_TMPFS_NODE(ap->a_vp);
- return lockmgr(&tnp->tn_vlock, ap->a_flags | LK_RELEASE, NULL);
+ return lockmgr(&tnp->tn_vlock, LK_RELEASE, NULL);
}
int
@@ -1348,9 +1348,9 @@ tmpfs_rename(void *v)
* the caller does reject rename("x/.", "y"). Go figure.)
*/
- VOP_UNLOCK(tdvp, 0, curproc);
+ VOP_UNLOCK(tdvp, curproc);
if ((tvp != NULL) && (tvp != tdvp))
- VOP_UNLOCK(tvp, 0, curproc);
+ VOP_UNLOCK(tvp, curproc);
vrele(fvp);
if (tvp != NULL)
@@ -1776,7 +1776,7 @@ fail3: if (tvp != NULL) {
}
fail2: vput(fvp);
-fail1: VOP_UNLOCK(dvp, 0, curproc);
+fail1: VOP_UNLOCK(dvp, curproc);
fail0: return error;
}
@@ -1879,10 +1879,10 @@ tmpfs_rename_exit(struct tmpfs_mount *tmpfs,
else
vrele(tvp);
}
- VOP_UNLOCK(tdvp, 0, curproc);
+ VOP_UNLOCK(tdvp, curproc);
vput(fvp);
if (fdvp != tdvp)
- VOP_UNLOCK(fdvp, 0, curproc);
+ VOP_UNLOCK(fdvp, curproc);
#if 0 /* XXX */
if (fdvp != tdvp)
@@ -1906,7 +1906,7 @@ tmpfs_rename_lock_directory(struct vnode *vp, struct tmpfs_node *node)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
if (node->tn_spec.tn_dir.tn_parent == NULL) {
- VOP_UNLOCK(vp, 0, curproc);
+ VOP_UNLOCK(vp, curproc);
return ENOENT;
}
@@ -1976,7 +1976,7 @@ tmpfs_rename_genealogy(struct tmpfs_node *fdnode, struct tmpfs_node *tdnode,
node = parent;
}
- VOP_UNLOCK(tdnode->tn_vnode, 0, curproc);
+ VOP_UNLOCK(tdnode->tn_vnode, curproc);
return 0;
}
@@ -2164,7 +2164,7 @@ fail4: if (b_vp != NULL) {
}
fail3: KASSERT(VOP_ISLOCKED(b_dvp) == LK_EXCLUSIVE);
- VOP_UNLOCK(b_dvp, 0, curproc);
+ VOP_UNLOCK(b_dvp, curproc);
fail2: if (a_vp != NULL) {
KASSERT(VOP_ISLOCKED(a_vp) == LK_EXCLUSIVE);
@@ -2172,7 +2172,7 @@ fail2: if (a_vp != NULL) {
}
fail1: KASSERT(VOP_ISLOCKED(a_dvp) == LK_EXCLUSIVE);
- VOP_UNLOCK(a_dvp, 0, curproc);
+ VOP_UNLOCK(a_dvp, curproc);
fail0: /* KASSERT(VOP_ISLOCKED(a_dvp) != LK_EXCLUSIVE); */
/* KASSERT(VOP_ISLOCKED(b_dvp) != LK_EXCLUSIVE); */
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c
index c3edcad6ad2..714a040d8ca 100644
--- a/sys/ufs/ext2fs/ext2fs_inode.c
+++ b/sys/ufs/ext2fs/ext2fs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_inode.c,v 1.57 2016/02/27 18:50:38 natano Exp $ */
+/* $OpenBSD: ext2fs_inode.c,v 1.58 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */
/*
@@ -132,7 +132,7 @@ ext2fs_inactive(void *v)
ext2fs_update(ip, 0);
}
out:
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/*
* If we are done with the inode, reclaim it
* so that it can be reused immediately.
diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c
index c9d6efba009..6e17fdeaa03 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.41 2016/03/14 23:08:06 krw Exp $ */
+/* $OpenBSD: ext2fs_lookup.c,v 1.42 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ext2fs_lookup.c,v 1.16 2000/08/03 20:29:26 thorpej Exp $ */
/*
@@ -429,7 +429,7 @@ searchloop:
*/
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (EJUSTRETURN);
@@ -512,7 +512,7 @@ found:
}
*vpp = tdp;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (0);
@@ -538,7 +538,7 @@ found:
*vpp = tdp;
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (0);
@@ -565,7 +565,7 @@ found:
*/
pdp = vdp;
if (flags & ISDOTDOT) {
- VOP_UNLOCK(pdp, 0, p); /* race to get the inode */
+ VOP_UNLOCK(pdp, p); /* 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)
@@ -587,7 +587,7 @@ found:
if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0)
return (error);
if (!lockparent || !(flags & ISLASTCN)) {
- VOP_UNLOCK(pdp, 0, p);
+ VOP_UNLOCK(pdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
*vpp = tdp;
diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c
index f7dab095bbd..2f742c736c1 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.87 2016/03/17 18:52:31 bluhm Exp $ */
+/* $OpenBSD: ext2fs_vfsops.c,v 1.88 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */
/*
@@ -211,7 +211,7 @@ ext2fs_mount(struct mount *mp, const char *path, void *data,
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
}
@@ -264,7 +264,7 @@ ext2fs_mount(struct mount *mp, const char *path, void *data,
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
goto error_devvp;
}
@@ -598,7 +598,7 @@ out:
brelse(bp);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (ump) {
free(ump->um_e2fs, M_UFSMNT, sizeof *ump->um_e2fs);
free(ump, M_UFSMNT, sizeof *ump);
@@ -667,7 +667,7 @@ ext2fs_flushfiles(struct mount *mp, int flags, struct proc *p)
*/
vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_FSYNC(ump->um_devvp, p->p_ucred, MNT_WAIT, p);
- VOP_UNLOCK(ump->um_devvp, 0, p);
+ VOP_UNLOCK(ump->um_devvp, p);
return (error);
}
@@ -793,7 +793,7 @@ ext2fs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)
vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0)
allerror = error;
- VOP_UNLOCK(ump->um_devvp, 0, p);
+ VOP_UNLOCK(ump->um_devvp, p);
}
/*
* Write back modified superblock.
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index 7d1ad1e2784..271fd221cff 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.76 2016/02/27 18:50:38 natano Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.77 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -477,7 +477,7 @@ ext2fs_link(void *v)
pool_put(&namei_pool, cnp->cn_pnbuf);
out1:
if (dvp != vp)
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
out2:
vput(dvp);
return (error);
@@ -585,13 +585,13 @@ abortit:
dp = VTOI(fdvp);
ip = VTOI(fvp);
if ((nlink_t)ip->i_e2fs_nlink >= LINK_MAX) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EMLINK;
goto abortit;
}
if ((ip->i_e2fs_flags & (EXT2_IMMUTABLE | EXT2_APPEND)) ||
(dp->i_e2fs_flags & EXT2_APPEND)) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EPERM;
goto abortit;
}
@@ -601,7 +601,7 @@ abortit:
error = VOP_ACCESS(tvp, VWRITE, tcnp->cn_cred,
tcnp->cn_proc);
if (error) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EACCES;
goto abortit;
}
@@ -613,7 +613,7 @@ abortit:
(fcnp->cn_flags&ISDOTDOT) ||
(tcnp->cn_flags & ISDOTDOT) ||
(ip->i_flag & IN_RENAME)) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EINVAL;
goto abortit;
}
@@ -641,7 +641,7 @@ abortit:
ip->i_e2fs_nlink++;
ip->i_flag |= IN_CHANGE;
if ((error = ext2fs_update(ip, 1)) != 0) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
goto bad;
}
@@ -656,7 +656,7 @@ abortit:
* call to checkpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
if (oldparent != dp->i_number)
newparent = dp->i_number;
if (doingdirectory && newparent) {
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 5c2eafb3013..02a0e9ed8a5 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.131 2015/01/09 05:01:57 tedu Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.132 2016/03/19 12:04:16 natano Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -868,7 +868,7 @@ softdep_flushworklist(struct mount *oldmnt, int *countp, struct proc *p)
*countp += count;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_FSYNC(devvp, p->p_ucred, MNT_WAIT, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
break;
}
@@ -4568,7 +4568,7 @@ softdep_fsync(struct vnode *vp)
* ufs_lookup for details on possible races.
*/
FREE_LOCK(&lk);
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
error = VFS_VGET(mnt, parentino, &pvp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (error != 0)
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 8c8106ce607..2b24d1d32cb 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.153 2016/03/17 18:52:32 bluhm Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.154 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -272,7 +272,7 @@ ffs_mount(struct mount *mp, const char *path, void *data,
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, VREAD | VWRITE,
p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
goto error_1;
}
@@ -365,7 +365,7 @@ ffs_mount(struct mount *mp, const char *path, void *data,
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
goto error_2;
}
@@ -540,7 +540,7 @@ ffs_reload(struct mount *mountp, struct ucred *cred, struct proc *p)
devvp = VFSTOUFS(mountp)->um_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, 0, cred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
panic("ffs_reload: dirty1");
@@ -686,7 +686,7 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
return (EBUSY);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = vinvalbuf(devvp, V_SAVE, cred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (error)
return (error);
@@ -908,7 +908,7 @@ out:
vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
- VOP_UNLOCK(devvp, 0, p);
+ VOP_UNLOCK(devvp, p);
if (ump) {
free(ump->um_fs, M_UFSMNT, ump->um_fs->fs_sbsize);
@@ -1073,7 +1073,7 @@ ffs_flushfiles(struct mount *mp, int flags, struct proc *p)
*/
vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
error = VOP_FSYNC(ump->um_devvp, p->p_ucred, MNT_WAIT, p);
- VOP_UNLOCK(ump->um_devvp, 0, p);
+ VOP_UNLOCK(ump->um_devvp, p);
return (error);
}
@@ -1138,7 +1138,7 @@ ffs_sync_vnode(struct vnode *vp, void *arg) {
if ((error = VOP_FSYNC(vp, fsa->cred, fsa->waitfor, fsa->p)))
fsa->allerror = error;
- VOP_UNLOCK(vp, 0, fsa->p);
+ VOP_UNLOCK(vp, fsa->p);
vrele(vp);
return (0);
@@ -1200,7 +1200,7 @@ ffs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)
vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY, p);
if ((error = VOP_FSYNC(ump->um_devvp, cred, waitfor, p)) != 0)
allerror = error;
- VOP_UNLOCK(ump->um_devvp, 0, p);
+ VOP_UNLOCK(ump->um_devvp, p);
}
qsync(mp);
/*
diff --git a/sys/ufs/mfs/mfs_vnops.c b/sys/ufs/mfs/mfs_vnops.c
index 596f40efadc..4cf8d03321c 100644
--- a/sys/ufs/mfs/mfs_vnops.c
+++ b/sys/ufs/mfs/mfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfs_vnops.c,v 1.46 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: mfs_vnops.c,v 1.47 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: mfs_vnops.c,v 1.8 1996/03/17 02:16:32 christos Exp $ */
/*
@@ -235,7 +235,7 @@ mfs_inactive(void *v)
if (mfsp->mfs_shutdown && bufq_peek(&mfsp->mfs_bufq))
panic("mfs_inactive: not inactive");
#endif
- VOP_UNLOCK(ap->a_vp, 0, ap->a_p);
+ VOP_UNLOCK(ap->a_vp, ap->a_p);
return (0);
}
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index 43d7f96bd5d..7f8688913fb 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_inode.c,v 1.41 2015/03/14 03:38:53 jsg Exp $ */
+/* $OpenBSD: ufs_inode.c,v 1.42 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ufs_inode.c,v 1.7 1996/05/11 18:27:52 mycroft Exp $ */
/*
@@ -111,7 +111,7 @@ ufs_inactive(void *v)
UFS_UPDATE(ip, 0);
}
out:
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
/*
* If we are done with the inode, reclaim it
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index 4126332f1a7..5d037f83467 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.48 2016/02/27 18:50:38 natano Exp $ */
+/* $OpenBSD: ufs_lookup.c,v 1.49 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */
/*
@@ -422,7 +422,7 @@ notfound:
*/
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (EJUSTRETURN);
@@ -503,7 +503,7 @@ found:
}
*vpp = tdp;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (0);
@@ -532,7 +532,7 @@ found:
*vpp = tdp;
cnp->cn_flags |= SAVENAME;
if (!lockparent) {
- VOP_UNLOCK(vdp, 0, p);
+ VOP_UNLOCK(vdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
return (0);
@@ -559,7 +559,7 @@ found:
*/
pdp = vdp;
if (flags & ISDOTDOT) {
- VOP_UNLOCK(pdp, 0, p); /* race to get the inode */
+ VOP_UNLOCK(pdp, p); /* race to get the inode */
cnp->cn_flags |= PDIRUNLOCK;
error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp);
if (error) {
@@ -583,7 +583,7 @@ found:
if (error)
return (error);
if (!lockparent || !(flags & ISLASTCN)) {
- VOP_UNLOCK(pdp, 0, p);
+ VOP_UNLOCK(pdp, p);
cnp->cn_flags |= PDIRUNLOCK;
}
*vpp = tdp;
@@ -778,7 +778,7 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp,
if ((error = VOP_BWRITE(bp)))
return (error);
if (tvp != NULL)
- VOP_UNLOCK(tvp, 0, p);
+ VOP_UNLOCK(tvp, p);
error = VOP_FSYNC(dvp, p->p_ucred, MNT_WAIT, p);
if (tvp != NULL)
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY, p);
@@ -918,7 +918,7 @@ ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp,
if (error == 0 && dp->i_endoff && dp->i_endoff < DIP(dp, size)) {
if (tvp != NULL)
- VOP_UNLOCK(tvp, 0, p);
+ VOP_UNLOCK(tvp, p);
error = UFS_TRUNCATE(dp, (off_t)dp->i_endoff, IO_SYNC, cr);
#ifdef UFS_DIRHASH
if (error == 0 && dp->i_dirhash != NULL)
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 2126a0e892d..8585f881c33 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.38 2016/03/14 23:08:06 krw Exp $ */
+/* $OpenBSD: ufs_quota.c,v 1.39 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */
/*
@@ -499,7 +499,7 @@ quotaon(struct proc *p, struct mount *mp, int type, caddr_t fname)
if ((error = vn_open(&nd, FREAD|FWRITE, 0)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
if (vp->v_type != VREG) {
(void) vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
return (EACCES);
@@ -921,7 +921,7 @@ dqget(struct vnode *vp, u_long id, struct ufsmount *ump, int type,
if (auio.uio_resid == sizeof(struct dqblk) && error == 0)
memset(&dq->dq_dqb, 0, sizeof(struct dqblk));
if (vp != dqvp)
- VOP_UNLOCK(dqvp, 0, p);
+ VOP_UNLOCK(dqvp, p);
if (dq->dq_flags & DQ_WANT)
wakeup(dq);
dq->dq_flags = 0;
@@ -998,7 +998,7 @@ dqsync(struct vnode *vp, struct dquot *dq)
(void) tsleep(dq, PINOD+2, "dqsync", 0);
if ((dq->dq_flags & DQ_MOD) == 0) {
if (vp != dqvp)
- VOP_UNLOCK(dqvp, 0, p);
+ VOP_UNLOCK(dqvp, p);
return (0);
}
}
@@ -1019,7 +1019,7 @@ dqsync(struct vnode *vp, struct dquot *dq)
wakeup(dq);
dq->dq_flags &= ~(DQ_MOD|DQ_LOCK|DQ_WANT);
if (vp != dqvp)
- VOP_UNLOCK(dqvp, 0, p);
+ VOP_UNLOCK(dqvp, p);
return (error);
}
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index a6372174e06..7117e6901f4 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.126 2016/02/27 18:50:38 natano Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.127 2016/03/19 12:04:16 natano Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -673,7 +673,7 @@ ufs_link(void *v)
VN_KNOTE(dvp, NOTE_WRITE);
out1:
if (dvp != vp)
- VOP_UNLOCK(vp, 0, p);
+ VOP_UNLOCK(vp, p);
out2:
vput(dvp);
return (error);
@@ -798,13 +798,13 @@ abortit:
dp = VTOI(fdvp);
ip = VTOI(fvp);
if ((nlink_t) DIP(ip, nlink) >= LINK_MAX) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EMLINK;
goto abortit;
}
if ((DIP(ip, flags) & (IMMUTABLE | APPEND)) ||
(DIP(dp, flags) & APPEND)) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EPERM;
goto abortit;
}
@@ -813,7 +813,7 @@ abortit:
if (!error && tvp)
error = VOP_ACCESS(tvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
if (error) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EACCES;
goto abortit;
}
@@ -825,7 +825,7 @@ abortit:
(fcnp->cn_flags & ISDOTDOT) ||
(tcnp->cn_flags & ISDOTDOT) ||
(ip->i_flag & IN_RENAME)) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
error = EINVAL;
goto abortit;
}
@@ -856,7 +856,7 @@ abortit:
if (DOINGSOFTDEP(fvp))
softdep_change_linkcnt(ip, 0);
if ((error = UFS_UPDATE(ip, !DOINGSOFTDEP(fvp))) != 0) {
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
goto bad;
}
@@ -871,7 +871,7 @@ abortit:
* call to checkpath().
*/
error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_proc);
- VOP_UNLOCK(fvp, 0, p);
+ VOP_UNLOCK(fvp, p);
/* tdvp and tvp locked */
if (oldparent != dp->i_number)
@@ -1550,7 +1550,7 @@ ufs_unlock(void *v)
struct vop_unlock_args *ap = v;
struct vnode *vp = ap->a_vp;
- return (lockmgr(&VTOI(vp)->i_lock, ap->a_flags | LK_RELEASE, NULL));
+ return (lockmgr(&VTOI(vp)->i_lock, LK_RELEASE, NULL));
}
/*
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 4900ba4e113..a34de75e723 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.91 2015/08/27 18:59:58 deraadt Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.92 2016/03/19 12:04:16 natano 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)
curproc->p_ucred);
if ((uvn->u_flags & UVM_VNODE_VNISLOCKED) == 0)
- VOP_UNLOCK(vn, 0, curproc);
+ VOP_UNLOCK(vn, curproc);
}
/* NOTE: vnode now unlocked (unless vnislocked) */
@@ -1303,7 +1303,7 @@ uvm_vnp_uncache(struct vnode *vp)
* unlocked causing us to return TRUE when we should not. we ignore
* this as a false-positive return value doesn't hurt us.
*/
- VOP_UNLOCK(vp, 0, curproc);
+ VOP_UNLOCK(vp, curproc);
uvn_detach(&uvn->u_obj);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);