Module Name: src
Committed By: hannken
Date: Sun Jan 2 10:38:02 UTC 2011
Modified Files:
src/sys/miscfs/genfs: layer_vnops.c
Log Message:
layer_inactive: With specnodes introduced during vmlocking2
it is safe to cache device nodes.
Tested with nullfs only as unionfs with device nodes panics.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 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_vnops.c
diff -u src/sys/miscfs/genfs/layer_vnops.c:1.43 src/sys/miscfs/genfs/layer_vnops.c:1.44
--- src/sys/miscfs/genfs/layer_vnops.c:1.43 Fri Jul 2 08:09:51 2010
+++ src/sys/miscfs/genfs/layer_vnops.c Sun Jan 2 10:38:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: layer_vnops.c,v 1.43 2010/07/02 08:09:51 hannken Exp $ */
+/* $NetBSD: layer_vnops.c,v 1.44 2011/01/02 10:38:02 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.43 2010/07/02 08:09:51 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.44 2011/01/02 10:38:02 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -557,11 +557,9 @@
struct vnode *vp = ap->a_vp;
/*
- * ..., but don't cache the device node. Also, if we did a
- * remove, don't cache the node.
+ * If we did a remove, don't cache the node.
*/
- *ap->a_recycle = (vp->v_type == VBLK || vp->v_type == VCHR
- || (VTOLAYER(vp)->layer_flags & LAYERFS_REMOVED));
+ *ap->a_recycle = ((VTOLAYER(vp)->layer_flags & LAYERFS_REMOVED) != 0);
/*
* Do nothing (and _don't_ bypass).