summaryrefslogtreecommitdiffstats
path: root/sys/tmpfs
diff options
context:
space:
mode:
authorgerhard <gerhard@openbsd.org>2020-07-15 07:27:07 +0000
committergerhard <gerhard@openbsd.org>2020-07-15 07:27:07 +0000
commit78b494b9f2ea8045977f4f151cd33afdbe5b04b6 (patch)
tree912cde40015f10cccb048047a6c12277fc8c74b3 /sys/tmpfs
parentUse SENSOR_ENERGY as the type of energy sensors. (diff)
downloadwireguard-openbsd-78b494b9f2ea8045977f4f151cd33afdbe5b04b6.tar.xz
wireguard-openbsd-78b494b9f2ea8045977f4f151cd33afdbe5b04b6.zip
tmpfs_reclaim() has to make sure the VFS cache has no more locks held
for the vnode. ok beck@
Diffstat (limited to 'sys/tmpfs')
-rw-r--r--sys/tmpfs/tmpfs_vnops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/tmpfs/tmpfs_vnops.c b/sys/tmpfs/tmpfs_vnops.c
index 37b3c0a397b..29a9cb4a386 100644
--- a/sys/tmpfs/tmpfs_vnops.c
+++ b/sys/tmpfs/tmpfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfs_vnops.c,v 1.42 2020/06/11 09:18:43 mpi Exp $ */
+/* $OpenBSD: tmpfs_vnops.c,v 1.43 2020/07/15 07:27:07 gerhard Exp $ */
/* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */
/*
@@ -1080,6 +1080,8 @@ tmpfs_reclaim(void *v)
racing = TMPFS_NODE_RECLAIMING(node);
rw_exit_write(&node->tn_nlock);
+ cache_purge(vp);
+
/*
* If inode is not referenced, i.e. no links, then destroy it.
* Note: if racing - inode is about to get a new vnode, leave it.