Module Name: src
Committed By: pooka
Date: Fri Jan 14 11:07:42 UTC 2011
Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c
Log Message:
Release etfs node's backing vnode before freeing the etfs node.
spotted from the LOCKDEBUG run that martin accidentally did
To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/rump/librump/rumpvfs/rumpfs.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/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.88 src/sys/rump/librump/rumpvfs/rumpfs.c:1.89
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.88 Thu Jan 13 10:26:47 2011
+++ src/sys/rump/librump/rumpvfs/rumpfs.c Fri Jan 14 11:07:42 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.88 2011/01/13 10:26:47 pooka Exp $ */
+/* $NetBSD: rumpfs.c,v 1.89 2011/01/14 11:07:42 pooka Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.88 2011/01/13 10:26:47 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.89 2011/01/14 11:07:42 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -213,6 +213,10 @@
struct vnode *rfsmp_rvp;
};
+#define INO_WHITEOUT 1
+static int lastino = 2;
+static kmutex_t reclock;
+
static struct rumpfs_node *makeprivate(enum vtype, dev_t, off_t, bool);
/*
@@ -478,8 +482,18 @@
mutex_exit(&etfs_lock);
/* node is unreachable, safe to nuke all device copies */
- if (et->et_blkmin != -1)
+ if (et->et_blkmin != -1) {
vdevgone(RUMPBLK_DEVMAJOR, et->et_blkmin, et->et_blkmin, VBLK);
+ } else {
+ struct vnode *vp;
+
+ mutex_enter(&reclock);
+ if ((vp = et->et_rn->rn_vp) != NULL)
+ mutex_enter(&vp->v_interlock);
+ mutex_exit(&reclock);
+ if (vp && vget(vp, 0) == 0)
+ vgone(vp);
+ }
if (et->et_rn->rn_hostpath != NULL)
free(et->et_rn->rn_hostpath, M_TEMP);
@@ -493,10 +507,6 @@
* rumpfs
*/
-#define INO_WHITEOUT 1
-static int lastino = 2;
-static kmutex_t reclock;
-
static struct rumpfs_node *
makeprivate(enum vtype vt, dev_t rdev, off_t size, bool et)
{