Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern vrelel(): clear VV_MAPPED with the vnode still locked.



details:   https://anonhg.NetBSD.org/src/rev/0dd3598cf3ef
branches:  trunk
changeset: 850461:0dd3598cf3ef
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Apr 04 20:54:42 2020 +0000

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

diffstat:

 sys/kern/vfs_vnode.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 74cd467f7c10 -r 0dd3598cf3ef sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c      Sat Apr 04 20:52:18 2020 +0000
+++ b/sys/kern/vfs_vnode.c      Sat Apr 04 20:54:42 2020 +0000
@@ -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 @@
                        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 @@
                        VSTATE_ASSERT(vp, VS_LOADED);
                        /* vcache_reclaim drops the lock. */
                        vcache_reclaim(vp);
+               } else {
+                       VOP_UNLOCK(vp);
                }
                KASSERT(vp->v_usecount > 0);
        }



Home | Main Index | Thread Index | Old Index