diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2018-05-27 06:02:16 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2018-05-27 06:02:16 +0000 |
commit | 8e4bc01cbdf7ca1a1a77219b742a496f8cc29087 (patch) | |
tree | c8bd46cd06278e2a2e3dbdd55b3e8e4ca90be921 /sys/kern | |
parent | 4299f29c929116884e41aa3622afa672eb6c591f (diff) |
Drop unnecessary `p' parameter from vget(9).
OK mpi@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_ktrace.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_cache.c | 7 | ||||
-rw-r--r-- | sys/kern/vfs_getcwd.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_sync.c | 4 |
5 files changed, 12 insertions, 14 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 8a14c70d1e1..0996084952f 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.96 2018/04/28 03:13:04 visa Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.97 2018/05/27 06:02:14 visa Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -640,7 +640,7 @@ ktrwriteraw(struct proc *curp, struct vnode *vp, struct ucred *cred, auio.uio_iovcnt++; auio.uio_resid += kth->ktr_len; } - vget(vp, LK_EXCLUSIVE | LK_RETRY, curp); + vget(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_WRITE(vp, &auio, IO_UNIT|IO_APPEND, cred); if (!error) { vput(vp); diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c1c87183b8a..f3c3996f332 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cache.c,v 1.55 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: vfs_cache.c,v 1.56 2018/05/27 06:02:14 visa Exp $ */ /* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */ /* @@ -145,7 +145,6 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct namecache *ncp; struct namecache n; struct vnode *vp; - struct proc *p = curproc; u_long vpid; int error; @@ -211,7 +210,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, } else if (cnp->cn_flags & ISDOTDOT) { VOP_UNLOCK(dvp); cnp->cn_flags |= PDIRUNLOCK; - error = vget(vp, LK_EXCLUSIVE, p); + error = vget(vp, LK_EXCLUSIVE); /* * If the above vget() succeeded and both LOCKPARENT and * ISLASTCN is set, lock the directory vnode as well. @@ -224,7 +223,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, cnp->cn_flags &= ~PDIRUNLOCK; } } else { - error = vget(vp, LK_EXCLUSIVE, p); + error = vget(vp, LK_EXCLUSIVE); /* * If the above vget() failed or either of LOCKPARENT or * ISLASTCN is set, unlock the directory vnode. diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c index 7aa36d540e0..4e04ceb0925 100644 --- a/sys/kern/vfs_getcwd.c +++ b/sys/kern/vfs_getcwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_getcwd.c,v 1.30 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: vfs_getcwd.c,v 1.31 2018/05/27 06:02:14 visa Exp $ */ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /* @@ -210,7 +210,6 @@ vfs_getcwd_getcache(struct vnode **lvpp, struct vnode **uvpp, char **bpp, char *bufp) { struct vnode *lvp, *uvp = NULL; - struct proc *p = curproc; char *obp; int error, vpid; @@ -235,7 +234,7 @@ vfs_getcwd_getcache(struct vnode **lvpp, struct vnode **uvpp, char **bpp, /* Release current lock before acquiring the parent lock */ VOP_UNLOCK(lvp); - error = vget(uvp, LK_EXCLUSIVE | LK_RETRY, p); + error = vget(uvp, LK_EXCLUSIVE | LK_RETRY); if (error) *uvpp = NULL; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ac2310268ee..ac6231d0b5f 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.272 2018/05/08 10:53:35 bluhm Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.273 2018/05/27 06:02:14 visa Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -540,7 +540,7 @@ loop: vgonel(vp, p); goto loop; } - if (vget(vp, LK_EXCLUSIVE, p)) { + if (vget(vp, LK_EXCLUSIVE)) { goto loop; } break; @@ -606,7 +606,7 @@ loop: * having been changed to a new file system type. */ int -vget(struct vnode *vp, int flags, struct proc *p) +vget(struct vnode *vp, int flags) { int error, s, onfreelist; diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c index 755ca7411cb..1e8fe91ccdc 100644 --- a/sys/kern/vfs_sync.c +++ b/sys/kern/vfs_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_sync.c,v 1.58 2018/04/28 03:13:05 visa Exp $ */ +/* $OpenBSD: vfs_sync.c,v 1.59 2018/05/27 06:02:14 visa Exp $ */ /* * Portions of this code are: @@ -156,7 +156,7 @@ sched_sync(struct proc *p) syncer_delayno = 0; while ((vp = LIST_FIRST(slp)) != NULL) { - if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT, p)) { + if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT)) { /* * If we fail to get the lock, we move this * vnode one second ahead in time. |