Module Name:    src
Committed By:   ad
Date:           Sat Apr  4 20:54:43 UTC 2020

Modified Files:
        src/sys/kern: vfs_vnode.c

Log Message:
vrelel(): clear VV_MAPPED with the vnode still locked.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/kern/vfs_vnode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.117 src/sys/kern/vfs_vnode.c:1.118
--- src/sys/kern/vfs_vnode.c:1.117	Sat Apr  4 20:49:30 2020
+++ src/sys/kern/vfs_vnode.c	Sat Apr  4 20:54:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.117 2020/04/04 20:49:30 ad Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.118 2020/04/04 20:54:42 ad Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.117 2020/04/04 20:49:30 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.118 2020/04/04 20:54:42 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -847,9 +847,6 @@ vrelel(vnode_t *vp, int flags, int lktyp
 			rw_exit(vp->v_uobj.vmobjlock);
 			return;
 		}
-		if (!recycle) {
-			VOP_UNLOCK(vp);
-		}
 
 		/* Take care of space accounting. */
 		if ((vp->v_iflag & VI_EXECMAP) != 0 &&
@@ -869,6 +866,8 @@ vrelel(vnode_t *vp, int flags, int lktyp
 			VSTATE_ASSERT(vp, VS_LOADED);
 			/* vcache_reclaim drops the lock. */
 			vcache_reclaim(vp);
+		} else {
+			VOP_UNLOCK(vp);
 		}
 		KASSERT(vp->v_usecount > 0);
 	}

Reply via email to