Module Name:    src
Committed By:   hannken
Date:           Tue Jun 17 12:38:12 UTC 2014

Modified Files:
        src/sys/fs/union: union_subr.c

Log Message:
Unlock directory vnode after VOP_CREATE.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/fs/union/union_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/union/union_subr.c
diff -u src/sys/fs/union/union_subr.c:1.65 src/sys/fs/union/union_subr.c:1.66
--- src/sys/fs/union/union_subr.c:1.65	Sat May 17 04:07:15 2014
+++ src/sys/fs/union/union_subr.c	Tue Jun 17 12:38:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_subr.c,v 1.65 2014/05/17 04:07:15 dholland Exp $	*/
+/*	$NetBSD: union_subr.c,v 1.66 2014/06/17 12:38:12 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.65 2014/05/17 04:07:15 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.66 2014/06/17 12:38:12 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -892,10 +892,13 @@ union_vn_create(struct vnode **vpp, stru
 	vref(un->un_dirvp);
 	vp = NULL;
 	error = VOP_CREATE(un->un_dirvp, &vp, &cn, vap);
-	if (error)
+	if (error) {
+		VOP_UNLOCK(un->un_dirvp);
 		return error;
+	}
 
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	VOP_UNLOCK(un->un_dirvp);
 	error = VOP_OPEN(vp, fmode, cred);
 	if (error) {
 		vput(vp);

Reply via email to