Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/rmind-uvmplock]: src/sys Fix vnode interlock sharing.
details: https://anonhg.NetBSD.org/src/rev/70e5f0c07665
branches: rmind-uvmplock
changeset: 753089:70e5f0c07665
user: rmind <rmind%NetBSD.org@localhost>
date: Sun May 22 04:29:04 2011 +0000
description:
Fix vnode interlock sharing.
diffstat:
sys/fs/tmpfs/tmpfs_subr.c | 5 +++--
sys/kern/vfs_vnode.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r c3792b9b4db4 -r 70e5f0c07665 sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c Sat May 21 21:26:48 2011 +0000
+++ b/sys/fs/tmpfs/tmpfs_subr.c Sun May 22 04:29:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_subr.c,v 1.56.4.5 2011/05/19 03:43:02 rmind Exp $ */
+/* $NetBSD: tmpfs_subr.c,v 1.56.4.6 2011/05/22 04:29:04 rmind Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.56.4.5 2011/05/19 03:43:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.56.4.6 2011/05/22 04:29:04 rmind Exp $");
#include <sys/param.h>
#include <sys/dirent.h>
@@ -373,6 +373,7 @@
/* Set UVM object to use vnode_t::v_interlock (share it). */
uvm_obj_setlock(node->tn_spec.tn_reg.tn_aobj, vp->v_interlock);
+ mutex_obj_hold(vp->v_interlock);
error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
if (error != 0) {
diff -r c3792b9b4db4 -r 70e5f0c07665 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Sat May 21 21:26:48 2011 +0000
+++ b/sys/kern/vfs_vnode.c Sun May 22 04:29:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.5.2.3 2011/05/19 03:43:03 rmind Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.5.2.4 2011/05/22 04:29:04 rmind Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.5.2.3 2011/05/19 03:43:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.5.2.4 2011/05/22 04:29:04 rmind Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -424,6 +424,7 @@
if (svp) {
/* Set the interlock and mark that it is shared. */
KASSERT(vp->v_mount == NULL);
+ mutex_obj_hold(svp->v_interlock);
uvm_obj_setlock(&vp->v_uobj, svp->v_interlock);
KASSERT(vp->v_interlock == svp->v_interlock);
vp->v_iflag |= VI_LOCKSHARE;
Home |
Main Index |
Thread Index |
Old Index