Module Name: src
Committed By: hannken
Date: Wed Aug 10 15:56:01 UTC 2011
Modified Files:
src/sys/fs/union: union_subr.c
Log Message:
Update the (shared) v_interlock if the upper node changes.
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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.45 src/sys/fs/union/union_subr.c:1.46
--- src/sys/fs/union/union_subr.c:1.45 Wed Aug 10 06:19:54 2011
+++ src/sys/fs/union/union_subr.c Wed Aug 10 15:56:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.45 2011/08/10 06:19:54 hannken Exp $ */
+/* $NetBSD: union_subr.c,v 1.46 2011/08/10 15:56:01 hannken Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.45 2011/08/10 06:19:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.46 2011/08/10 15:56:01 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -223,6 +223,12 @@
un->un_uppervp = uppervp;
un->un_uppersz = VNOVAL;
+ /* Update union vnode interlock. */
+ if (uppervp != NULL) {
+ mutex_obj_hold(uppervp->v_interlock);
+ uvm_obj_setlock(&UNIONTOV(un)->v_uobj,
+ uppervp->v_interlock);
+ }
}
if (docache && (ohash != nhash)) {