summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authornatano <natano@cvs.openbsd.org>2016-03-19 12:04:17 +0000
committernatano <natano@cvs.openbsd.org>2016-03-19 12:04:17 +0000
commita9bad0de99cbc0922b684917f300008ad4b7f821 (patch)
tree9bbf0a65b8ad489ea32bb54265c084bd2efd6f50 /sys/kern
parentd16c6aa7a075ad00ce2bccb0a5b52b930477d6ac (diff)
Remove the unused flags argument from VOP_UNLOCK().
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
Diffstat (limited to 'sys/kern')
-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
20 files changed, 76 insertions, 77 deletions
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)