Module Name: src Committed By: hannken Date: Wed Jan 29 08:27:04 UTC 2014
Modified Files: src/sys/miscfs/genfs: layer_subr.c layer_vnops.c Log Message: Allow layer_node_create() with unlocked lower node and change layer_bypass() to enter nodes from creation operations unlocked. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/miscfs/genfs/layer_subr.c cvs rdiff -u -r1.52 -r1.53 src/sys/miscfs/genfs/layer_vnops.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/miscfs/genfs/layer_subr.c diff -u src/sys/miscfs/genfs/layer_subr.c:1.32 src/sys/miscfs/genfs/layer_subr.c:1.33 --- src/sys/miscfs/genfs/layer_subr.c:1.32 Sun Jun 12 03:35:58 2011 +++ src/sys/miscfs/genfs/layer_subr.c Wed Jan 29 08:27:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: layer_subr.c,v 1.32 2011/06/12 03:35:58 rmind Exp $ */ +/* $NetBSD: layer_subr.c,v 1.33 2014/01/29 08:27:04 hannken Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: layer_subr.c,v 1.32 2011/06/12 03:35:58 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: layer_subr.c,v 1.33 2014/01/29 08:27:04 hannken Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -260,8 +260,6 @@ layer_node_create(struct mount *mp, stru struct vnode *aliasvp; struct layer_mount *lmp = MOUNTTOLAYERMOUNT(mp); - KASSERT(VOP_ISLOCKED(lowervp)); - mutex_enter(&lmp->layerm_hashlock); aliasvp = layer_node_find(mp, lowervp); if (aliasvp != NULL) { Index: src/sys/miscfs/genfs/layer_vnops.c diff -u src/sys/miscfs/genfs/layer_vnops.c:1.52 src/sys/miscfs/genfs/layer_vnops.c:1.53 --- src/sys/miscfs/genfs/layer_vnops.c:1.52 Thu Jan 23 10:13:57 2014 +++ src/sys/miscfs/genfs/layer_vnops.c Wed Jan 29 08:27:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: layer_vnops.c,v 1.52 2014/01/23 10:13:57 hannken Exp $ */ +/* $NetBSD: layer_vnops.c,v 1.53 2014/01/29 08:27:04 hannken Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -170,7 +170,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.52 2014/01/23 10:13:57 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.53 2014/01/29 08:27:04 hannken Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -321,10 +321,7 @@ layer_bypass(void *v) * as a lookup on "." would generate a locking error. * So all the calls which get us here have a unlocked vpp. :-) */ - /* XXX: lock node until lookup returns unlocked nodes. */ - vn_lock(**vppp, LK_EXCLUSIVE | LK_RETRY); error = layer_node_create(mp, **vppp, *vppp); - VOP_UNLOCK(**vppp); if (error) { vrele(**vppp); **vppp = NULL;