summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2018-06-07 13:37:29 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2018-06-07 13:37:29 +0000
commit380a152a55a793d5891fd063c5856fe955061263 (patch)
tree2a642715663fa28e52eb1702f889ef1cf10d584f /sys/kern/vfs_vnops.c
parentfad718c914c60261c1c08c7123d69239f348d8ae (diff)
Make callers of VOP_CREATE(9) and VOP_MKNOD(9) responsible for
unlocking the directory vnode. OK mpi@, helg@
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 948306ce7aa..03fe499734c 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.92 2018/05/02 02:24:56 visa Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.93 2018/06/07 13:37:27 visa Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -109,6 +109,7 @@ vn_open(struct nameidata *ndp, int fmode, int cmode)
va.va_vaflags |= VA_EXCLUSIVE;
error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
&ndp->ni_cnd, &va);
+ vput(ndp->ni_dvp);
if (error)
return (error);
fmode &= ~O_TRUNC;