Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/union A union node may be reactivated while it is bei...



details:   https://anonhg.NetBSD.org/src/rev/e14bbe5558c6
branches:  trunk
changeset: 336292:e14bbe5558c6
user:      hannken <hannken%NetBSD.org@localhost>
date:      Tue Feb 24 16:08:01 2015 +0000

description:
A union node may be reactivated while it is being reclaimed so
change union_freevp() to detach the vnode from the union node
by clearing the vnode backpointer and the lower node sizes.

diffstat:

 sys/fs/union/union_subr.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 332d84eb3123 -r e14bbe5558c6 sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Tue Feb 24 14:49:28 2015 +0000
+++ b/sys/fs/union/union_subr.c Tue Feb 24 16:08:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: union_subr.c,v 1.70 2015/02/16 10:22:00 hannken Exp $  */
+/*     $NetBSD: union_subr.c,v 1.71 2015/02/24 16:08:01 hannken Exp $  */
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.70 2015/02/16 10:22:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.71 2015/02/24 16:08:01 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -534,8 +534,14 @@
 {
        struct union_node *un = VTOUNION(vp);
 
+       /* Detach vnode from union node. */
+       un->un_vnode = NULL;
+       un->un_uppersz = VNOVAL;
+       un->un_lowersz = VNOVAL;
+
        vcache_remove(vp->v_mount, &un, sizeof(un));
 
+       /* Detach union node from vnode. */
        mutex_enter(vp->v_interlock);
        vp->v_data = NULL;
        mutex_exit(vp->v_interlock);



Home | Main Index | Thread Index | Old Index