summaryrefslogtreecommitdiff
path: root/sys/miscfs/union/union_vnops.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-07-26 20:46:30 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-07-26 20:46:30 +0000
commitab43a29b969e743d29d43b321883ca1dda79faad (patch)
tree3e80782a886afa0ceda4b303e6fb9cb2403fef61 /sys/miscfs/union/union_vnops.c
parent6d6bb3cf1119ef381770158f490377f6cdb65672 (diff)
missed this in previous symlink/mknod backout
Diffstat (limited to 'sys/miscfs/union/union_vnops.c')
-rw-r--r--sys/miscfs/union/union_vnops.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c
index cd5016d027a..54e4a2cae05 100644
--- a/sys/miscfs/union/union_vnops.c
+++ b/sys/miscfs/union/union_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: union_vnops.c,v 1.14 2001/07/26 02:10:41 assar Exp $ */
+/* $OpenBSD: union_vnops.c,v 1.15 2001/07/26 20:46:29 millert Exp $ */
/* $NetBSD: union_vnops.c,v 1.30.4.1 1996/05/25 22:10:14 jtc Exp $ */
/*
@@ -592,17 +592,19 @@ union_mknod(v)
if (error)
return (error);
- error = union_allocvp(
- ap->a_vpp,
- mp,
- NULLVP,
- NULLVP,
- ap->a_cnp,
- vp,
- NULLVP,
- 1);
- if (error)
- vput(vp);
+ if (vp != NULLVP) {
+ error = union_allocvp(
+ ap->a_vpp,
+ mp,
+ NULLVP,
+ NULLVP,
+ ap->a_cnp,
+ vp,
+ NULLVP,
+ 1);
+ if (error)
+ vput(vp);
+ }
return (error);
}
@@ -1396,13 +1398,15 @@ union_symlink(v)
if (dvp != NULLVP) {
int error;
+ struct vnode *vp;
FIXUP(un, p);
VREF(dvp);
un->un_flags |= UN_KLOCK;
vput(ap->a_dvp);
- error = VOP_SYMLINK(dvp, ap->a_vpp, ap->a_cnp,
+ error = VOP_SYMLINK(dvp, &vp, ap->a_cnp,
ap->a_vap, ap->a_target);
+ *ap->a_vpp = NULLVP;
return (error);
}