diff options
| author | assar <assar@NetBSD.org> | 2001-07-24 15:39:30 +0000 |
|---|---|---|
| committer | assar <assar@NetBSD.org> | 2001-07-24 15:39:30 +0000 |
| commit | bec71dc090fea8d431f9840f12fef5f85ceed7e3 (patch) | |
| tree | 6621be8029079ac2ede2ffa016d334552b5ff922 /sys/miscfs | |
| parent | 8dc13781cbb64b12ff739e564c2c43462566f50b (diff) | |
change vop_symlink and vop_mknod to return vpp (the created node)
refed, so that the caller can actually use it. update callers and
file systems that implement these vnode operations
Diffstat (limited to 'sys/miscfs')
| -rw-r--r-- | sys/miscfs/genfs/layer_vnops.c | 7 | ||||
| -rw-r--r-- | sys/miscfs/union/union_vnops.c | 17 |
2 files changed, 10 insertions, 14 deletions
diff --git a/sys/miscfs/genfs/layer_vnops.c b/sys/miscfs/genfs/layer_vnops.c index a9fda71a1eb..733c2aeac9d 100644 --- a/sys/miscfs/genfs/layer_vnops.c +++ b/sys/miscfs/genfs/layer_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: layer_vnops.c,v 1.6 2001/06/07 13:32:47 wiz Exp $ */ +/* $NetBSD: layer_vnops.c,v 1.7 2001/07/24 15:39:32 assar Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -71,7 +71,7 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: layer_vnops.c,v 1.6 2001/06/07 13:32:47 wiz Exp $ + * $Id: layer_vnops.c,v 1.7 2001/07/24 15:39:32 assar Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project */ @@ -393,8 +393,7 @@ layer_bypass(v) descp->vdesc_vpp_offset,ap); /* * Only vop_lookup, vop_create, vop_makedir, vop_bmap, - * vop_mknod, and vop_symlink return vpp's. The latter - * two are VPP_WILLRELE, so we won't get here, and vop_bmap + * vop_mknod, and vop_symlink return vpp's. vop_bmap * doesn't call bypass as the lower vpp is fine (we're just * going to do i/o on it). vop_loookup doesn't call bypass * as a lookup on "." would generate a locking error. diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index 37711a93e16..2736b3fde65 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: union_vnops.c,v 1.53 2001/07/04 21:38:00 chs Exp $ */ +/* $NetBSD: union_vnops.c,v 1.54 2001/07/24 15:39:32 assar Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995 Jan-Simon Pendry. @@ -610,12 +610,10 @@ union_mknod(v) if (error) return (error); - if (vp != NULLVP) { - error = union_allocvp(ap->a_vpp, mp, NULLVP, NULLVP, - cnp, vp, NULLVP, 1); - if (error) - vput(vp); - } + error = union_allocvp(ap->a_vpp, mp, NULLVP, NULLVP, + cnp, vp, NULLVP, 1); + if (error) + vput(vp); return (error); } @@ -1527,14 +1525,13 @@ union_symlink(v) if (dvp != NULLVP) { int error; - struct vnode *vp; FIXUP(un); VREF(dvp); un->un_flags |= UN_KLOCK; vput(ap->a_dvp); - error = VOP_SYMLINK(dvp, &vp, cnp, ap->a_vap, ap->a_target); - *ap->a_vpp = NULLVP; + error = VOP_SYMLINK(dvp, ap->a_vpp, cnp, ap->a_vap, + ap->a_target); return (error); } |
