Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Assign vnode to dead_rootmount before vcache_deallo...
details: https://anonhg.NetBSD.org/src/rev/2441b8172940
branches: trunk
changeset: 997071:2441b8172940
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Feb 20 10:06:33 2019 +0000
description:
Assign vnode to dead_rootmount before vcache_dealloc() releases it.
Now v_mount is never NULL.
diffstat:
sys/kern/vfs_vnode.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r f2e96b26cbb0 -r 2441b8172940 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Wed Feb 20 10:05:59 2019 +0000
+++ b/sys/kern/vfs_vnode.c Wed Feb 20 10:06:33 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.101 2019/01/01 10:06:54 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.102 2019/02/20 10:06:33 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.101 2019/01/01 10:06:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.102 2019/02/20 10:06:33 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1162,6 +1162,8 @@
KASSERT(mutex_owned(&vcache_lock));
vp = VIMPL_TO_VNODE(vip);
+ vfs_ref(dead_rootmount);
+ vfs_insmntque(vp, dead_rootmount);
mutex_enter(vp->v_interlock);
vp->v_op = dead_vnodeop_p;
VSTATE_CHANGE(vp, VS_LOADING, VS_RECLAIMED);
Home |
Main Index |
Thread Index |
Old Index