Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern vfs_vnode_iterator_destroy: set v_usecount of marke...
details: https://anonhg.NetBSD.org/src/rev/bd559a9c3c7b
branches: trunk
changeset: 335475:bd559a9c3c7b
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Jan 08 12:06:50 2015 +0000
description:
vfs_vnode_iterator_destroy: set v_usecount of marker to zero to prevent
an assertion from vnfree().
diffstat:
sys/kern/vfs_mount.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 44d1d6917934 -r bd559a9c3c7b sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c Thu Jan 08 10:47:44 2015 +0000
+++ b/sys/kern/vfs_mount.c Thu Jan 08 12:06:50 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_mount.c,v 1.31 2014/11/14 10:09:50 manu Exp $ */
+/* $NetBSD: vfs_mount.c,v 1.32 2015/01/08 12:06:50 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.31 2014/11/14 10:09:50 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.32 2015/01/08 12:06:50 hannken Exp $");
#define _VFS_VNODE_PRIVATE
@@ -365,8 +365,10 @@
mutex_enter(&mntvnode_lock);
KASSERT(ISSET(mvp->v_iflag, VI_MARKER));
- if (mvp->v_usecount != 0)
+ if (mvp->v_usecount != 0) {
TAILQ_REMOVE(&mvp->v_mount->mnt_vnodelist, mvp, v_mntvnodes);
+ mvp->v_usecount = 0;
+ }
mutex_exit(&mntvnode_lock);
vnfree(mvp);
}
Home |
Main Index |
Thread Index |
Old Index