Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/union Unlock directory vnode after VOP_CREATE.



details:   https://anonhg.NetBSD.org/src/rev/4a0e3bfa266b
branches:  trunk
changeset: 330010:4a0e3bfa266b
user:      hannken <hannken%NetBSD.org@localhost>
date:      Tue Jun 17 12:38:12 2014 +0000

description:
Unlock directory vnode after VOP_CREATE.

diffstat:

 sys/fs/union/union_subr.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 406b7b6080f7 -r 4a0e3bfa266b sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Tue Jun 17 10:47:27 2014 +0000
+++ b/sys/fs/union/union_subr.c Tue Jun 17 12:38:12 2014 +0000
@@ -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 @@
        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);



Home | Main Index | Thread Index | Old Index