summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2001-03-21 17:05:29 +0000
committerart <art@openbsd.org>2001-03-21 17:05:29 +0000
commitc4aedcdc96e9807b8f26c571f4b9ab32f31e39b1 (patch)
tree59c844e4337bb1fc384c8ce546dee1cb0376e3e8 /sys/kern/vfs_subr.c
parentFix typo, connnection -> connection (diff)
downloadwireguard-openbsd-c4aedcdc96e9807b8f26c571f4b9ab32f31e39b1.tar.xz
wireguard-openbsd-c4aedcdc96e9807b8f26c571f4b9ab32f31e39b1.zip
uvm_vnp_terminate expect the vnode to be locked.
Why didn't LOCKDEBUG catch this?
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index bad71924e8e..90386b2ac44 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.56 2001/03/16 16:10:31 art Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.57 2001/03/21 17:05:29 art Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -979,12 +979,6 @@ vclean(vp, flags, p)
if (vp->v_flag & VXLOCK)
panic("vclean: deadlock");
vp->v_flag |= VXLOCK;
-#ifdef UVM
- /*
- * clean out any VM data associated with the vnode.
- */
- uvm_vnp_terminate(vp);
-#endif
/*
* Even if the count is zero, the VOP_INACTIVE routine may still
* have the object locked while it cleans it out. The VOP_LOCK
@@ -994,6 +988,12 @@ vclean(vp, flags, p)
*/
VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, p);
+#ifdef UVM
+ /*
+ * clean out any VM data associated with the vnode.
+ */
+ uvm_vnp_terminate(vp);
+#endif
/*
* Clean out any buffers associated with the vnode.
*/