Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/sys/sys Hack: Instead of dying in vrele ...
details: https://anonhg.NetBSD.org/src/rev/68b911f64355
branches: trunk
changeset: 790177:68b911f64355
user: christos <christos%NetBSD.org@localhost>
date: Mon Sep 23 19:44:21 2013 +0000
description:
Hack: Instead of dying in vrele with a kernel assertion, detect that the
usecount of the vnode is 0 and treat it as a noop. This is wrong, buf it
get us through the VN_RELE() after the close in vdev_file.c
diffstat:
external/cddl/osnet/sys/sys/vnode.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r 7fea7437a6b0 -r 68b911f64355 external/cddl/osnet/sys/sys/vnode.h
--- a/external/cddl/osnet/sys/sys/vnode.h Mon Sep 23 19:42:42 2013 +0000
+++ b/external/cddl/osnet/sys/sys/vnode.h Mon Sep 23 19:44:21 2013 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: vnode.h,v 1.9 2011/06/12 04:43:11 mrg Exp $ */
+/* $NetBSD: vnode.h,v 1.10 2013/09/23 19:44:21 christos Exp $ */
/*
* CDDL HEADER START
@@ -294,7 +294,12 @@
#define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0)
#define VN_HOLD(v) vref(v)
-#define VN_RELE(v) vrele(v)
+#define VN_RELE(v) do { \
+ if ((v)->v_usecount == 0) \
+ printf("%s, %d: %p unused\n", __FILE__, __LINE__, v); \
+ else \
+ vrele(v); \
+ } while (/*CONSTCOND*/0)
#define VN_URELE(v) vput(v)
#define VN_SET_VFS_TYPE_DEV(vp, vfs, type, flag) (0)
Home |
Main Index |
Thread Index |
Old Index