diff options
Diffstat (limited to 'sys')
39 files changed, 110 insertions, 111 deletions
diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index 93625762508..2b408a5e685 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_misc.c,v 1.46 2004/06/24 19:35:23 tholo Exp $ */ +/* $OpenBSD: sunos_misc.c,v 1.47 2009/07/09 22:29:55 thib Exp $ */ /* $NetBSD: sunos_misc.c,v 1.65 1996/04/22 01:44:31 christos Exp $ */ /* @@ -603,7 +603,7 @@ sunos_sys_fchroot(p, v, retval) FRELE(fp); return (error); } - VREF(vp); + vref(vp); if (fdp->fd_rdir != NULL) vrele(fdp->fd_rdir); fdp->fd_rdir = vp; diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 3a46429143e..4a386150acd 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_misc.c,v 1.49 2007/10/01 12:10:55 martin Exp $ */ +/* $OpenBSD: svr4_misc.c,v 1.50 2009/07/09 22:29:55 thib Exp $ */ /* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */ /* @@ -440,7 +440,7 @@ svr4_sys_fchroot(p, v, retval) FRELE(fp); return error; } - VREF(vp); + vref(vp); if (fdp->fd_rdir != NULL) vrele(fdp->fd_rdir); fdp->fd_rdir = vp; diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index ac2983a2303..2ad38420036 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.49 2008/11/09 05:13:53 deraadt Exp $ */ +/* $OpenBSD: systrace.c,v 1.50 2009/07/09 22:29:55 thib Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -1186,9 +1186,9 @@ systrace_getcwd(struct fsystrace *fst, struct str_process *strp) fst->fd_rdir = myfdp->fd_rdir; if ((myfdp->fd_cdir = fdp->fd_cdir) != NULL) - VREF(myfdp->fd_cdir); + vref(myfdp->fd_cdir); if ((myfdp->fd_rdir = fdp->fd_rdir) != NULL) - VREF(myfdp->fd_rdir); + vref(myfdp->fd_rdir); return (0); } diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index 6f913280309..208bbab842f 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.15 2007/10/29 13:02:19 chl Exp $ */ +/* $OpenBSD: cd9660_lookup.c,v 1.16 2009/07/09 22:29:55 thib Exp $ */ /* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */ /*- @@ -398,7 +398,7 @@ found: *vpp = tdp; } else if (dp->i_number == dp->i_ino) { brelse(bp); - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { error = cd9660_vget_internal(vdp->v_mount, dp->i_ino, &tdp, diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index fbf67947c25..62a67c8e750 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.49 2009/05/21 23:45:48 krw Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.50 2009/07/09 22:29:55 thib Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -847,7 +847,7 @@ retry: ip->i_mnt = imp; ip->i_devvp = imp->im_devvp; - VREF(ip->i_devvp); + vref(ip->i_devvp); if (relocated) { /* diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c index dedd9c61561..85bf2556eb2 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.28 2009/06/05 04:35:25 krw Exp $ */ +/* $OpenBSD: udf_vfsops.c,v 1.29 2009/07/09 22:29:56 thib Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -577,7 +577,7 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) up->u_dev = ump->um_dev; up->u_ump = ump; vp->v_data = up; - VREF(ump->um_devvp); + vref(ump->um_devvp); lockinit(&up->u_lock, PINOD, "unode", 0, 0); diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index 104e7ae1d93..48b77b38305 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.35 2009/06/05 04:35:25 krw Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.36 2009/07/09 22:29:56 thib Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -1006,7 +1006,7 @@ udf_lookup(void *v) * If dvp is what's being looked up, then return it. */ if (ap->a_cnp->cn_namelen == 1 && ap->a_cnp->cn_nameptr[0] == '.') { - VREF(dvp); + vref(dvp); *vpp = dvp; return (0); } diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index ba5887bdc6f..c3aaf9858d3 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.159 2009/04/19 17:53:38 deraadt Exp $ */ +/* $OpenBSD: init_main.c,v 1.160 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -463,7 +463,7 @@ main(void *framep) if (VFS_ROOT(CIRCLEQ_FIRST(&mountlist), &rootvnode)) panic("cannot find root vnode"); p->p_fd->fd_cdir = rootvnode; - VREF(p->p_fd->fd_cdir); + vref(p->p_fd->fd_cdir); VOP_UNLOCK(rootvnode, 0, p); p->p_fd->fd_rdir = NULL; @@ -473,7 +473,7 @@ main(void *framep) * share proc0's CWD info. */ initproc->p_fd->fd_cdir = rootvnode; - VREF(initproc->p_fd->fd_cdir); + vref(initproc->p_fd->fd_cdir); initproc->p_fd->fd_rdir = NULL; /* diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 893cb85a9eb..1620de45d2c 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.81 2008/11/25 18:04:38 blambert Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.82 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -856,10 +856,10 @@ fdinit(struct proc *p) struct filedesc *fdp = p->p_fd; newfdp->fd_fd.fd_cdir = fdp->fd_cdir; - VREF(newfdp->fd_fd.fd_cdir); + vref(newfdp->fd_fd.fd_cdir); newfdp->fd_fd.fd_rdir = fdp->fd_rdir; if (newfdp->fd_fd.fd_rdir) - VREF(newfdp->fd_fd.fd_rdir); + vref(newfdp->fd_fd.fd_rdir); } rw_init(&newfdp->fd_fd.fd_lock, "fdlock"); @@ -902,9 +902,9 @@ fdcopy(struct proc *p) newfdp = pool_get(&fdesc_pool, PR_WAITOK); bcopy(fdp, newfdp, sizeof(struct filedesc)); if (newfdp->fd_cdir) - VREF(newfdp->fd_cdir); + vref(newfdp->fd_cdir); if (newfdp->fd_rdir) - VREF(newfdp->fd_rdir); + vref(newfdp->fd_rdir); newfdp->fd_refcnt = 1; /* diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 5678bab6590..4647db66fac 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.109 2009/01/04 00:28:42 thib Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.110 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -464,7 +464,7 @@ sys_execve(struct proc *p, void *v, register_t *retval) /* record proc's vnode, for use by procfs and others */ if (p->p_textvp) vrele(p->p_textvp); - VREF(pack.ep_vp); + vref(pack.ep_vp); p->p_textvp = pack.ep_vp; atomic_setbits_int(&p->p_flag, P_EXEC); diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index b2947bd4421..117d6b7962e 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.103 2009/04/14 09:13:25 art Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.104 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -286,7 +286,7 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize, /* bump references to the text vnode (for procfs) */ p2->p_textvp = p1->p_textvp; if (p2->p_textvp) - VREF(p2->p_textvp); + vref(p2->p_textvp); if (flags & FORK_CLEANFILES) p2->p_fd = fdinit(p1); @@ -332,7 +332,7 @@ fork1(struct proc *p1, int exitsig, int flags, void *stack, size_t stacksize, if (p1->p_traceflag & KTRFAC_INHERIT) { p2->p_traceflag = p1->p_traceflag; if ((p2->p_tracep = p1->p_tracep) != NULL) - VREF(p2->p_tracep); + vref(p2->p_tracep); } #endif diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 1c38f7f85fc..828cf614d14 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.46 2008/11/01 21:35:35 pedro Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.47 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -71,7 +71,7 @@ ktrsettracevnode(struct proc *p, struct vnode *newvp) return; if (newvp != NULL) - VREF(newvp); + vref(newvp); vp = p->p_tracep; p->p_tracep = newvp; diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index e729d18d543..f0b22ed6016 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cache.c,v 1.29 2008/10/24 00:22:57 tedu Exp $ */ +/* $OpenBSD: vfs_cache.c,v 1.30 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */ /* @@ -165,7 +165,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) vp = ncp->nc_vp; vpid = vp->v_id; if (vp == dvp) { /* lookup on "." */ - VREF(dvp); + vref(dvp); error = 0; } else if (cnp->cn_flags & ISDOTDOT) { VOP_UNLOCK(dvp, 0, p); diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c index 398fc673e96..8e2fc786527 100644 --- a/sys/kern/vfs_getcwd.c +++ b/sys/kern/vfs_getcwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_getcwd.c,v 1.14 2009/04/17 15:17:27 blambert Exp $ */ +/* $OpenBSD: vfs_getcwd.c,v 1.15 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ /* @@ -279,8 +279,8 @@ vfs_getcwd_common(struct vnode *lvp, struct vnode *rvp, char **bpp, char *bufp, rvp = rootvnode; } - VREF(rvp); - VREF(lvp); + vref(rvp); + vref(lvp); error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p); if (error) { @@ -333,7 +333,7 @@ vfs_getcwd_common(struct vnode *lvp, struct vnode *rvp, char **bpp, char *bufp, goto out; } - VREF(lvp); + vref(lvp); error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, p); if (error) { diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index c1e1f80b719..ea8f77985b4 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.39 2009/03/09 16:56:55 blambert Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.40 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -166,10 +166,10 @@ namei(struct nameidata *ndp) */ if (cnp->cn_pnbuf[0] == '/') { dp = ndp->ni_rootdir; - VREF(dp); + vref(dp); } else { dp = fdp->fd_cdir; - VREF(dp); + vref(dp); } for (;;) { if (!dp->v_mount) { @@ -243,7 +243,7 @@ badlink: if (cnp->cn_pnbuf[0] == '/') { vrele(dp); dp = ndp->ni_rootdir; - VREF(dp); + vref(dp); } } pool_put(&namei_pool, cnp->cn_pnbuf); @@ -434,7 +434,7 @@ dirloop: if (dp == ndp->ni_rootdir || dp == rootvnode) { ndp->ni_dvp = dp; ndp->ni_vp = dp; - VREF(dp); + vref(dp); goto nextname; } if ((dp->v_flag & VROOT) == 0 || @@ -443,7 +443,7 @@ dirloop: tdp = dp; dp = dp->v_mount->mnt_vnodecovered; vput(tdp); - VREF(dp); + vref(dp); vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, p); } } @@ -488,7 +488,7 @@ dirloop: */ if (cnp->cn_flags & SAVESTART) { ndp->ni_startdir = ndp->ni_dvp; - VREF(ndp->ni_startdir); + vref(ndp->ni_startdir); } return (0); } @@ -583,7 +583,7 @@ terminal: if (ndp->ni_dvp != NULL) { if (cnp->cn_flags & SAVESTART) { ndp->ni_startdir = ndp->ni_dvp; - VREF(ndp->ni_startdir); + vref(ndp->ni_startdir); } if (!wantparent) vrele(ndp->ni_dvp); @@ -684,7 +684,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) } /* ASSERT(dvp == ndp->ni_startdir) */ if (cnp->cn_flags & SAVESTART) - VREF(dvp); + vref(dvp); /* * We return with ni_vp NULL to indicate that the entry * doesn't currently exist, leaving a pointer to the @@ -719,7 +719,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) } /* ASSERT(dvp == ndp->ni_startdir) */ if (cnp->cn_flags & SAVESTART) - VREF(dvp); + vref(dvp); if (!wantparent) vrele(dvp); if ((cnp->cn_flags & LOCKLEAF) == 0) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1af3af694fa..1bc41d8f86c 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.155 2009/06/04 00:24:02 blambert Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.156 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -335,14 +335,14 @@ again: fdp = p->p_fd; if (fdp->fd_cdir == olddp) { vp = fdp->fd_cdir; - VREF(newdp); + vref(newdp); fdp->fd_cdir = newdp; if (vrele(vp)) goto again; } if (fdp->fd_rdir == olddp) { vp = fdp->fd_rdir; - VREF(newdp); + vref(newdp); fdp->fd_rdir = newdp; if (vrele(vp)) goto again; @@ -350,7 +350,7 @@ again: } if (rootvnode == olddp) { vrele(rootvnode); - VREF(newdp); + vref(newdp); rootvnode = newdp; } vput(newdp); @@ -698,7 +698,7 @@ sys_fchdir(struct proc *p, void *v, register_t *retval) if ((error = getvnode(fdp, SCARG(uap, fd), &fp)) != 0) return (error); vp = (struct vnode *)fp->f_data; - VREF(vp); + vref(vp); FRELE(fp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); if (vp->v_type != VDIR) @@ -776,7 +776,7 @@ sys_chroot(struct proc *p, void *v, register_t *retval) */ vrele(fdp->fd_rdir); vrele(fdp->fd_cdir); - VREF(nd.ni_vp); + vref(nd.ni_vp); fdp->fd_cdir = nd.ni_vp; } fdp->fd_rdir = nd.ni_vp; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 39492c2d547..943a499d3b1 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.62 2009/01/29 22:08:45 guenther Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.63 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -438,7 +438,7 @@ vn_ioctl(struct file *fp, u_long com, caddr_t data, struct proc *p) if (p->p_session->s_ttyvp) vrele(p->p_session->s_ttyvp); p->p_session->s_ttyvp = vp; - VREF(vp); + vref(vp); } return (error); } diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c index 01e05099815..ee959434394 100644 --- a/sys/miscfs/portal/portal_vfsops.c +++ b/sys/miscfs/portal/portal_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vfsops.c,v 1.23 2008/11/02 11:37:32 thib Exp $ */ +/* $OpenBSD: portal_vfsops.c,v 1.24 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: portal_vfsops.c,v 1.14 1996/02/09 22:40:41 christos Exp $ */ /* @@ -206,7 +206,7 @@ portal_root(struct mount *mp, struct vnode **vpp) * Return locked reference to root. */ vp = VFSTOPORTAL(mp)->pm_root; - VREF(vp); + vref(vp); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); *vpp = vp; return (0); diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index fede74bf576..d890db75c16 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vnops.c,v 1.28 2008/11/02 11:37:32 thib Exp $ */ +/* $OpenBSD: portal_vnops.c,v 1.29 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: portal_vnops.c,v 1.17 1996/02/13 13:12:57 mycroft Exp $ */ /* @@ -170,7 +170,7 @@ portal_lookup(void *v) if (cnp->cn_namelen == 1 && *pname == '.') { *vpp = dvp; - VREF(dvp); + vref(dvp); return (0); } diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index df7fa971424..4a9c1771263 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_vnops.c,v 1.45 2008/06/09 23:38:37 millert Exp $ */ +/* $OpenBSD: procfs_vnops.c,v 1.46 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */ /* @@ -657,7 +657,7 @@ procfs_lookup(void *v) if (cnp->cn_namelen == 1 && *pname == '.') { *vpp = dvp; - VREF(dvp); + vref(dvp); return (0); } @@ -749,7 +749,7 @@ procfs_lookup(void *v) if (pt->pt_pfstype == Pfile) { fvp = p->p_textvp; /* We already checked that it exists. */ - VREF(fvp); + vref(fvp); vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY, curp); if (wantpunlock) { VOP_UNLOCK(dvp, 0, curp); diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 98fe26de870..634a1d09b7f 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_denode.c,v 1.35 2008/01/13 21:27:09 krw Exp $ */ +/* $OpenBSD: msdosfs_denode.c,v 1.36 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */ /*- @@ -219,7 +219,7 @@ retry: * Directory entry was not in cache, have to create a vnode and * copy it from the passed disk buffer. */ - /* getnewvnode() does a VREF() on the vnode */ + /* getnewvnode() does a vref() on the vnode */ error = getnewvnode(VT_MSDOSFS, pmp->pm_mountp, msdosfs_vnodeop_p, &nvp); if (error) { @@ -329,7 +329,7 @@ retry: } } else nvp->v_type = VREG; - VREF(ldep->de_devvp); + vref(ldep->de_devvp); *depp = ldep; return (0); } diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c index a1fa8ce5f56..b74c9717515 100644 --- a/sys/msdosfs/msdosfs_lookup.c +++ b/sys/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_lookup.c,v 1.20 2007/11/27 16:22:13 martynas Exp $ */ +/* $OpenBSD: msdosfs_lookup.c,v 1.21 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 ws Exp $ */ /*- @@ -482,7 +482,7 @@ foundroot:; * Save directory inode pointer in ndp->ni_dvp for dirremove(). */ if (dp->de_StartCluster == scn && isadir) { /* "." */ - VREF(vdp); + vref(vdp); *vpp = vdp; return (0); } @@ -565,7 +565,7 @@ foundroot:; } *vpp = DETOV(tdp); } else if (dp->de_StartCluster == scn && isadir) { - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0) diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 80acea94818..81f338d56a7 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.96 2009/05/30 17:20:29 thib Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.97 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -1284,7 +1284,7 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p) error = ENOTDIR; goto out; } - VREF(dp); + vref(dp); *retdirp = dp; ndp->ni_startdir = dp; if (rdonly) diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index ee879632549..aeb0310ee78 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.115 2009/06/25 15:49:26 thib Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.116 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -845,7 +845,7 @@ dorpc: */ if (NFS_CMPFH(np, fhp, fhsize)) { - VREF(dvp); + vref(dvp); newvp = dvp; if (v3) { nfsm_postop_attr(newvp, attrflag); @@ -2438,7 +2438,7 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, if (doit) { nfsm_getfh(fhp, fhsize, 1); if (NFS_CMPFH(dnp, fhp, fhsize)) { - VREF(vp); + vref(vp); newvp = vp; np = dnp; } else { @@ -2545,7 +2545,7 @@ nfs_sillyrename(dvp, vp, cnp) sp = malloc(sizeof(struct sillyrename), M_NFSREQ, M_WAITOK); sp->s_cred = crdup(cnp->cn_cred); sp->s_dvp = dvp; - VREF(dvp); + vref(dvp); if (vp->v_type == VDIR) { #ifdef DIAGNOSTIC @@ -2632,7 +2632,7 @@ nfs_lookitup(dvp, name, len, cred, procp, npp) np->n_fhsize = fhlen; newvp = NFSTOV(np); } else if (NFS_CMPFH(dnp, nfhp, fhlen)) { - VREF(dvp); + vref(dvp); newvp = dvp; np = dnp; } else { diff --git a/sys/nnpfs/nnpfs_node-bsd.c b/sys/nnpfs/nnpfs_node-bsd.c index 1f6ace40860..f2e9179a915 100644 --- a/sys/nnpfs/nnpfs_node-bsd.c +++ b/sys/nnpfs/nnpfs_node-bsd.c @@ -653,7 +653,7 @@ nnpfs_dnlc_lock(struct vnode *dvp, */ if (*res == dvp) { /* "." */ - VREF(dvp); + vref(dvp); } else if (cnp->cn_flags & ISDOTDOT) { /* ".." */ u_long vpid = dvp->v_id; diff --git a/sys/nnpfs/nnpfs_vfsops-bsd.c b/sys/nnpfs/nnpfs_vfsops-bsd.c index 2e29829aa27..33ad64dc3a4 100644 --- a/sys/nnpfs/nnpfs_vfsops-bsd.c +++ b/sys/nnpfs/nnpfs_vfsops-bsd.c @@ -175,7 +175,7 @@ common_fhtovp(struct mount * mp, if (vp->v_usecount <= 0) nnpfs_do_vget(vp, 0, curproc); else - VREF(vp); + vref(vp); error = 0; } diff --git a/sys/nnpfs/nnpfs_vnodeops-common.c b/sys/nnpfs/nnpfs_vnodeops-common.c index e8ed71842e9..fa01d81932a 100644 --- a/sys/nnpfs/nnpfs_vnodeops-common.c +++ b/sys/nnpfs/nnpfs_vnodeops-common.c @@ -577,7 +577,7 @@ nnpfs_lookup_common(struct vnode *dvp, if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { *vpp = dvp; - VREF(*vpp); + vref(*vpp); return 0; } diff --git a/sys/nnpfs/nnpfs_vnodeops.h b/sys/nnpfs/nnpfs_vnodeops.h index 552734db621..e42ae1f63df 100644 --- a/sys/nnpfs/nnpfs_vnodeops.h +++ b/sys/nnpfs/nnpfs_vnodeops.h @@ -44,8 +44,8 @@ #ifdef __osf__ /* XXX - what about VN_LOCK? */ -#define nnpfs_vfs_readlock(vp, proc) VREF((vp)) -#define nnpfs_vfs_writelock(vp, proc) VREF((vp)) +#define nnpfs_vfs_readlock(vp, proc) vref((vp)) +#define nnpfs_vfs_writelock(vp, proc) vref((vp)) #define nnpfs_vfs_unlock(vp, proc) vrele((vp)) /* XXX - should this do anything? */ diff --git a/sys/ntfs/ntfs_subr.c b/sys/ntfs/ntfs_subr.c index 862329f5de8..57c95b4d9d1 100644 --- a/sys/ntfs/ntfs_subr.c +++ b/sys/ntfs/ntfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_subr.c,v 1.16 2009/03/25 20:39:47 oga Exp $ */ +/* $OpenBSD: ntfs_subr.c,v 1.17 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ntfs_subr.c,v 1.4 2003/04/10 21:37:32 jdolecek Exp $ */ /*- @@ -440,7 +440,7 @@ ntfs_ntlookup( ip->i_mp = ntmp; LIST_INIT(&ip->i_fnlist); - VREF(ip->i_devvp); + vref(ip->i_devvp); /* init lock and lock the newborn ntnode */ rw_init(&ip->i_lock, "ntnode"); @@ -1019,7 +1019,7 @@ ntfs_ntlookupfile( (attrname && fp->f_attrname && !strcmp(attrname, fp->f_attrname)))) { - VREF(vp); + vref(vp); *vpp = vp; error = 0; goto fail; diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index d19fbfea3f3..93c95061b4b 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.13 2008/05/13 02:24:08 brad Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.14 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -596,7 +596,7 @@ ntfs_mountfs(devvp, mp, argsp, p) if(error) goto out1; ntmp->ntm_sysvn[pi[i]]->v_flag |= VSYSTEM; - VREF(ntmp->ntm_sysvn[pi[i]]); + vref(ntmp->ntm_sysvn[pi[i]]); vput(ntmp->ntm_sysvn[pi[i]]); } } diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c index f6c2c007873..51b644f098c 100644 --- a/sys/ntfs/ntfs_vnops.c +++ b/sys/ntfs/ntfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vnops.c,v 1.14 2009/06/02 20:48:48 jasper Exp $ */ +/* $OpenBSD: ntfs_vnops.c,v 1.15 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */ /* @@ -734,7 +734,7 @@ ntfs_lookup(ap) dprintf(("ntfs_lookup: faking . directory in %d\n", dip->i_number)); - VREF(dvp); + vref(dvp); *ap->a_vpp = dvp; error = 0; } else if (cnp->cn_flags & ISDOTDOT) { diff --git a/sys/sys/exec.h b/sys/sys/exec.h index 2b2e7f85a1f..6791d2bf167 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.24 2007/05/26 00:36:03 krw Exp $ */ +/* $OpenBSD: exec.h,v 1.25 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: exec.h,v 1.59 1996/02/09 18:25:09 christos Exp $ */ /*- @@ -204,7 +204,7 @@ void new_vmcmd(struct exec_vmcmd_set *evsp, vcp->ev_len = (len); \ vcp->ev_addr = (addr); \ if ((vcp->ev_vp = (vp)) != NULLVP) \ - VREF(vp); \ + vref(vp); \ vcp->ev_offset = (offset); \ vcp->ev_prot = (prot); \ vcp->ev_flags = (flags); \ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index e640dc36027..ffa752ca279 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.100 2009/06/15 17:01:26 beck Exp $ */ +/* $OpenBSD: vnode.h,v 1.101 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -230,7 +230,6 @@ extern struct freelst vnode_hold_list; /* free vnodes referencing buffers */ extern struct freelst vnode_free_list; /* vnode free list */ #define VATTR_NULL(vap) vattr_null(vap) -#define VREF(vp) vref(vp) /* increase reference */ #define NULLVP ((struct vnode *)NULL) #define VN_KNOTE(vp, b) \ KNOTE(&vp->v_selectinfo.si_note, (b)) diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c index f0e94df4fc1..ff0df391dbc 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.24 2007/10/09 00:38:59 krw Exp $ */ +/* $OpenBSD: ext2fs_lookup.c,v 1.25 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ext2fs_lookup.c,v 1.16 2000/08/03 20:29:26 thorpej Exp $ */ /* @@ -573,7 +573,7 @@ found: else dp->i_count = dp->i_offset - prevoff; if (dp->i_number == dp->i_ino) { - VREF(vdp); + vref(vdp); *vpp = vdp; return (0); } @@ -664,7 +664,7 @@ found: } *vpp = tdp; } else if (dp->i_number == dp->i_ino) { - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp)) != 0) diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index b8ddb76e11a..2e2ce764eaf 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.52 2008/11/24 00:01:20 tedu Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.53 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -914,7 +914,7 @@ ext2fs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) /* * Finish inode initialization now that aliasing has been resolved. */ - VREF(ip->i_devvp); + vref(ip->i_devvp); /* * Set up a generation number for this inode if it does not * already have one. This should only happen on old filesystems. diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index d9a3a20b783..2364d4f429c 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.119 2008/11/06 18:13:31 deraadt Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.120 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -1257,7 +1257,7 @@ retry: ip = pool_get(&ffs_ino_pool, PR_WAITOK|PR_ZERO); lockinit(&ip->i_lock, PINOD, "inode", 0, 0); ip->i_ump = ump; - VREF(ip->i_devvp); + vref(ip->i_devvp); vp->v_data = ip; ip->i_vnode = vp; ip->i_fs = fs = ump->um_fs; diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 75e4789af69..a1eb019de51 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.37 2007/06/01 23:47:57 deraadt Exp $ */ +/* $OpenBSD: ufs_lookup.c,v 1.38 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */ /* @@ -484,7 +484,7 @@ found: else dp->i_count = dp->i_offset - prevoff; if (dp->i_number == dp->i_ino) { - VREF(vdp); + vref(vdp); *vpp = vdp; return (0); } @@ -579,7 +579,7 @@ found: } *vpp = tdp; } else if (dp->i_number == dp->i_ino) { - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { error = VFS_VGET(vdp->v_mount, dp->i_ino, &tdp); diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 12ff4569aa3..d02482e8ab0 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.76 2009/06/17 00:13:59 oga Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.77 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -1138,7 +1138,7 @@ uvm_mmap(vm_map_t map, vaddr_t *addr, vsize_t size, vm_prot_t prot, } #else /* XXX for now, attach doesn't gain a ref */ - VREF(vp); + vref(vp); #endif } else { uobj = udv_attach((void *) &vp->v_rdev, diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 83037992028..465db6d50bd 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_vnode.c,v 1.66 2009/06/17 00:13:59 oga Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.67 2009/07/09 22:29:56 thib Exp $ */ /* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */ /* @@ -191,10 +191,10 @@ uvn_attach(void *arg, vm_prot_t accessprot) */ if (uvn->u_flags & UVM_VNODE_VALID) { /* already active? */ - /* regain VREF if we were persisting */ + /* regain vref if we were persisting */ if (uvn->u_obj.uo_refs == 0) { - VREF(vp); - UVMHIST_LOG(maphist," VREF (reclaim persisting vnode)", + vref(vp); + UVMHIST_LOG(maphist," vref (reclaim persisting vnode)", 0,0,0,0); } uvn->u_obj.uo_refs++; /* bump uvn ref! */ @@ -292,12 +292,12 @@ uvn_attach(void *arg, vm_prot_t accessprot) * as there is a valid mapping of the vnode. dropped when the * reference count goes to zero [and we either free or persist]. */ - VREF(vp); + vref(vp); simple_unlock(&uvn->u_obj.vmobjlock); if (oldflags & UVM_VNODE_WANTED) wakeup(uvn); - UVMHIST_LOG(maphist,"<- done/VREF, ret %p", &uvn->u_obj,0,0,0); + UVMHIST_LOG(maphist,"<- done/vref, ret %p", &uvn->u_obj,0,0,0); return(&uvn->u_obj); } @@ -609,7 +609,7 @@ uvm_vnp_terminate(struct vnode *vp) } else { /* - * free the uvn now. note that the VREF reference is already + * free the uvn now. note that the vref reference is already * gone [it is dropped when we enter the persist state]. */ if (uvn->u_flags & UVM_VNODE_IOSYNCWANTED) @@ -1771,7 +1771,7 @@ uvm_vnp_uncache(struct vnode *vp) * it so that we can call uvn_detach to kill the uvn. */ - VREF(vp); /* seems ok, even with VOP_LOCK */ + vref(vp); /* seems ok, even with VOP_LOCK */ uvn->u_obj.uo_refs++; /* value is now 1 */ simple_unlock(&uvn->u_obj.vmobjlock); @@ -1903,7 +1903,7 @@ uvm_vnp_sync(struct mount *mp) * regain vnode REF). */ if (uvn->u_obj.uo_refs == 0) - VREF(vp); + vref(vp); uvn->u_obj.uo_refs++; SIMPLEQ_INSERT_HEAD(&uvn_sync_q, uvn, u_syncq); |