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 | |
parent | 4299f29c929116884e41aa3622afa672eb6c591f (diff) |
Drop unnecessary `p' parameter from vget(9).
OK mpi@
-rw-r--r-- | share/man/man9/vget.9 | 8 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 5 | ||||
-rw-r--r-- | sys/isofs/udf/udf_vnops.c | 5 | ||||
-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 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 5 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_node.c | 5 | ||||
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/ntfs/ntfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/sys/vnode.h | 4 | ||||
-rw-r--r-- | sys/tmpfs/tmpfs_subr.c | 4 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_ihash.c | 5 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 13 |
19 files changed, 46 insertions, 58 deletions
diff --git a/share/man/man9/vget.9 b/share/man/man9/vget.9 index f132235f944..2780acbb047 100644 --- a/share/man/man9/vget.9 +++ b/share/man/man9/vget.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: vget.9,v 1.11 2013/06/04 19:27:16 schwarze Exp $ +.\" $OpenBSD: vget.9,v 1.12 2018/05/27 06:02:14 visa Exp $ .\" .\" Copyright (c) 1996 Doug Rabson .\" @@ -28,7 +28,7 @@ .\" .\" $FreeBSD: src/share/man/man9/vget.9,v 1.7 2001/12/26 23:14:04 davidc Exp $ .\" -.Dd $Mdocdate: June 4 2013 $ +.Dd $Mdocdate: May 27 2018 $ .Dt VGET 9 .Os .Sh NAME @@ -38,7 +38,7 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fn vget "struct vnode *vp" "int flags" "struct proc *p" +.Fn vget "struct vnode *vp" "int flags" .Sh DESCRIPTION Get a vnode from the free list and increment its reference count. .Pp @@ -48,8 +48,6 @@ Its arguments are: The vnode to remove from the free list. .It Fa flags If non-zero, the vnode will also be locked. -.It Fa p -The process responsible for this call. .El .Pp When not in use, vnodes are kept on a free list. diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index c8839dfee64..fb75945b676 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.33 2018/04/28 03:13:04 visa Exp $ */ +/* $OpenBSD: cd9660_node.c,v 1.34 2018/05/27 06:02:14 visa Exp $ */ /* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */ /*- @@ -101,7 +101,6 @@ cd9660_ihashget(dev, inum) dev_t dev; cdino_t inum; { - struct proc *p = curproc; /* XXX */ struct iso_node *ip; struct vnode *vp; @@ -111,7 +110,7 @@ loop: if (inum == ip->i_number && dev == ip->i_dev) { vp = ITOV(ip); /* XXX locking unlock hash list? */ - if (vget(vp, LK_EXCLUSIVE, p)) + if (vget(vp, LK_EXCLUSIVE)) goto loop; return (vp); } diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index b8c670b1981..d4ffea8a196 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.66 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.67 2018/05/27 06:02:14 visa Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -87,7 +87,6 @@ udf_hashlookup(struct umount *ump, udfino_t id, int flags, struct vnode **vpp) { struct unode *up; struct udf_hash_lh *lh; - struct proc *p = curproc; int error; *vpp = NULL; @@ -104,7 +103,7 @@ loop: LIST_FOREACH(up, lh, u_le) { if (up->u_ino == id) { mtx_leave(&ump->um_hashmtx); - error = vget(up->u_vnode, flags, p); + error = vget(up->u_vnode, flags); if (error == ENOENT) goto loop; if (error) 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. diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index d50f5bc0283..6c2b3a67c08 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.62 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.63 2018/05/27 06:02:14 visa Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */ /*- @@ -104,7 +104,6 @@ static struct denode * msdosfs_hashget(dev_t dev, uint32_t dirclust, uint32_t diroff) { struct denode *dep; - struct proc *p = curproc; /* XXX */ for (;;) for (dep = dehashtbl[DEHASH(dev, dirclust, diroff)]; ; @@ -117,7 +116,7 @@ msdosfs_hashget(dev_t dev, uint32_t dirclust, uint32_t diroff) dep->de_refcnt != 0) { struct vnode *vp = DETOV(dep); - if (!vget(vp, LK_EXCLUSIVE, p)) + if (!vget(vp, LK_EXCLUSIVE)) return (dep); break; } diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index 8960a77a204..6a4e559d776 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vfsops.c,v 1.89 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: msdosfs_vfsops.c,v 1.90 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */ /*- @@ -676,7 +676,7 @@ msdosfs_sync_vnode(struct vnode *vp, void *arg) return (0); } - if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT, msa->p)) + if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT)) return (0); if ((error = VOP_FSYNC(vp, msa->cred, msa->waitfor, msa->p)) != 0) diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index fb1ab732654..155426e3666 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.69 2018/05/05 11:54:11 mpi Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.70 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -90,7 +90,6 @@ nfs_nget(struct mount *mnt, nfsfh_t *fh, int fhsize, struct nfsnode **npp) struct nfsmount *nmp; struct nfsnode *np, find, *np2; struct vnode *vp, *nvp; - struct proc *p = curproc; /* XXX */ int error; nmp = VFSTONFS(mnt); @@ -101,7 +100,7 @@ loop: np = RBT_FIND(nfs_nodetree, &nmp->nm_ntree, &find); if (np != NULL) { vp = NFSTOV(np); - error = vget(vp, LK_EXCLUSIVE, p); + error = vget(vp, LK_EXCLUSIVE); if (error) goto loop; *npp = np; diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index ae0b858104d..d2dbc4a09dc 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.120 2018/05/04 11:16:04 bluhm Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.121 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -814,7 +814,7 @@ loop: goto loop; if (VOP_ISLOCKED(vp) || LIST_FIRST(&vp->v_dirtyblkhd) == NULL) continue; - if (vget(vp, LK_EXCLUSIVE, p)) + if (vget(vp, LK_EXCLUSIVE)) goto loop; error = VOP_FSYNC(vp, cred, waitfor, p); if (error) diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index 2916e1b6fd4..2a08b935598 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.60 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.61 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -738,7 +738,7 @@ ntfs_vgetex(struct mount *mp, ntfsino_t ino, u_int32_t attrtype, char *attrname, if (FTOV(fp)) { /* vget() returns error if the vnode has been recycled */ - if (vget(FTOV(fp), lkflags, p) == 0) { + if (vget(FTOV(fp), lkflags) == 0) { *vpp = FTOV(fp); return (0); } diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 43ae93e32ba..6c2bac007ba 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.145 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: vnode.h,v 1.146 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -591,7 +591,7 @@ int vcount(struct vnode *); int vfinddev(dev_t, enum vtype, struct vnode **); void vflushbuf(struct vnode *, int); int vflush(struct mount *, struct vnode *, int); -int vget(struct vnode *, int, struct proc *); +int vget(struct vnode *, int); void vgone(struct vnode *); void vgonel(struct vnode *, struct proc *); int vinvalbuf(struct vnode *, int, struct ucred *, struct proc *, diff --git a/sys/tmpfs/tmpfs_subr.c b/sys/tmpfs/tmpfs_subr.c index 6216a56efb5..3b9465107d1 100644 --- a/sys/tmpfs/tmpfs_subr.c +++ b/sys/tmpfs/tmpfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_subr.c,v 1.20 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: tmpfs_subr.c,v 1.21 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: tmpfs_subr.c,v 1.79 2012/03/13 18:40:50 elad Exp $ */ /* @@ -281,7 +281,7 @@ again: /* atomic_or_ulong(&node->tn_gen, TMPFS_RECLAIMING_BIT); */ node->tn_gen |= TMPFS_RECLAIMING_BIT; rw_exit_write(&node->tn_nlock); - error = vget(vp, LK_EXCLUSIVE, curproc); + error = vget(vp, LK_EXCLUSIVE); if (error == ENOENT) { rw_enter_write(&node->tn_nlock); goto again; diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index 1fa9ea224f6..70290930cb5 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.106 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.107 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -317,7 +317,7 @@ ext2fs_reload_vnode(struct vnode *vp, void *args) /* * Step 5: invalidate all cached file data. */ - if (vget(vp, LK_EXCLUSIVE, era->p)) + if (vget(vp, LK_EXCLUSIVE)) return (0); if (vinvalbuf(vp, 0, era->cred, era->p, 0, 0)) @@ -725,7 +725,7 @@ ext2fs_sync_vnode(struct vnode *vp, void *args) goto end; } - if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT, esa->p)) { + if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT)) { nlink0 = 1; /* potentially */ goto end; } diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index de8c5bb2a3b..0695d54a489 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.176 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.177 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -504,7 +504,7 @@ ffs_reload_vnode(struct vnode *vp, void *args) /* * Step 5: invalidate all cached file data. */ - if (vget(vp, LK_EXCLUSIVE, fra->p)) + if (vget(vp, LK_EXCLUSIVE)) return (0); if (vinvalbuf(vp, 0, fra->cred, fra->p, 0, 0)) @@ -1179,7 +1179,7 @@ ffs_sync_vnode(struct vnode *vp, void *arg) goto end; } - if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT, fsa->p)) { + if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT)) { nlink0 = 1; /* potentially.. */ goto end; } diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 2421916a58a..3e73ec465dc 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_ihash.c,v 1.23 2016/06/19 11:54:34 natano Exp $ */ +/* $OpenBSD: ufs_ihash.c,v 1.24 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: ufs_ihash.c,v 1.3 1996/02/09 22:36:04 christos Exp $ */ /* @@ -106,7 +106,6 @@ ufs_ihashlookup(dev_t dev, ufsino_t inum) struct vnode * ufs_ihashget(dev_t dev, ufsino_t inum) { - struct proc *p = curproc; struct ihashhead *ipp; struct inode *ip; struct vnode *vp; @@ -117,7 +116,7 @@ loop: if (inum == ip->i_number && dev == ip->i_dev) { vp = ITOV(ip); /* XXXLOCKING unlock hash list? */ - if (vget(vp, LK_EXCLUSIVE, p)) + if (vget(vp, LK_EXCLUSIVE)) goto loop; return (vp); } diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 1e8b3b0db80..5786222c029 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.43 2018/05/02 02:24:56 visa Exp $ */ +/* $OpenBSD: ufs_quota.c,v 1.44 2018/05/27 06:02:15 visa Exp $ */ /* $NetBSD: ufs_quota.c,v 1.8 1996/02/09 22:36:09 christos Exp $ */ /* @@ -462,12 +462,11 @@ int quotaon_vnode(struct vnode *vp, void *arg) { int error; - struct proc *p = (struct proc *)arg; if (vp->v_type == VNON || vp->v_writecount == 0) return (0); - if (vget(vp, LK_EXCLUSIVE, p)) { + if (vget(vp, LK_EXCLUSIVE)) { return (0); } @@ -544,7 +543,7 @@ quotaon(struct proc *p, struct mount *mp, int type, caddr_t fname) * adding references to quota file being opened. * NB: only need to add dquot's for inodes being modified. */ - error = vfs_mount_foreach_vnode(mp, quotaon_vnode, p); + error = vfs_mount_foreach_vnode(mp, quotaon_vnode, NULL); ump->um_qflags[type] &= ~QTF_OPENING; if (error) @@ -567,8 +566,7 @@ quotaoff_vnode(struct vnode *vp, void *arg) if (vp->v_type == VNON) return (0); - - if (vget(vp, LK_EXCLUSIVE, qa->p)) + if (vget(vp, LK_EXCLUSIVE)) return (0); ip = VTOI(vp); dq = ip->i_dquot[qa->type]; @@ -760,13 +758,12 @@ int qsync_vnode(struct vnode *vp, void *arg) { int i; - struct proc *p = curproc; struct dquot *dq; if (vp->v_type == VNON) return (0); - if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT, p)) + if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT)) return (0); for (i = 0; i < MAXQUOTAS; i++) { |