Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make sure vcache_reclaim() will complete before fil...
details: https://anonhg.NetBSD.org/src/rev/40edf1de6b3f
branches: trunk
changeset: 351534:40edf1de6b3f
user: hannken <hannken%NetBSD.org@localhost>
date: Fri Feb 17 08:27:58 2017 +0000
description:
Make sure vcache_reclaim() will complete before file system suspension.
diffstat:
sys/kern/vfs_vnode.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (44 lines):
diff -r c99321548b1f -r 40edf1de6b3f sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Fri Feb 17 08:27:20 2017 +0000
+++ b/sys/kern/vfs_vnode.c Fri Feb 17 08:27:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.73 2017/01/27 10:50:10 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.74 2017/02/17 08:27:58 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.73 2017/01/27 10:50:10 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.74 2017/02/17 08:27:58 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1441,6 +1441,7 @@
{
lwp_t *l = curlwp;
vnode_impl_t *vip = VNODE_TO_VIMPL(vp);
+ struct mount *mp = vp->v_mount;
uint32_t hash;
uint8_t temp_buf[64], *temp_key;
size_t temp_key_len;
@@ -1477,6 +1478,8 @@
vip->vi_key.vk_key = temp_key;
mutex_exit(&vcache_lock);
+ fstrans_start(mp, FSTRANS_LAZY);
+
/*
* Clean out any cached data associated with the vnode.
* If purging an active vnode, it must be closed and
@@ -1537,6 +1540,8 @@
vp->v_tag = VT_NON;
KNOTE(&vp->v_klist, NOTE_REVOKE);
+ fstrans_done(mp);
+
KASSERT((vp->v_iflag & VI_ONWORKLST) == 0);
}
Home |
Main Index |
Thread Index |
Old Index