summaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/miscfs')
-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);
}