Source-Changes-HG archive

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

[src/trunk]: src/sys/kern If a vnode is marked with VI_EXECMAP then in all li...



details:   https://anonhg.NetBSD.org/src/rev/63ad0dac439b
branches:  trunk
changeset: 972937:63ad0dac439b
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Jun 14 00:20:17 2020 +0000

description:
If a vnode is marked with VI_EXECMAP then in all likelyhood it has pages.

diffstat:

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

diffs (37 lines):

diff -r 282f7068eb8b -r 63ad0dac439b sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c      Sat Jun 13 23:59:16 2020 +0000
+++ b/sys/kern/vfs_vnode.c      Sun Jun 14 00:20:17 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_vnode.c,v 1.124 2020/06/11 22:21:05 ad Exp $       */
+/*     $NetBSD: vfs_vnode.c,v 1.125 2020/06/14 00:20:17 ad Exp $       */
 
 /*-
  * Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.124 2020/06/11 22:21:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.125 2020/06/14 00:20:17 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -897,8 +897,7 @@
                }
 
                /* Take care of space accounting. */
-               if ((vp->v_iflag & VI_EXECMAP) != 0 &&
-                   vp->v_uobj.uo_npages != 0) {
+               if ((vp->v_iflag & VI_EXECMAP) != 0) {
                        cpu_count(CPU_COUNT_EXECPAGES, -vp->v_uobj.uo_npages);
                }
                vp->v_iflag &= ~(VI_TEXT|VI_EXECMAP|VI_WRMAP);
@@ -1707,7 +1706,7 @@
 
        rw_enter(vp->v_uobj.vmobjlock, RW_WRITER);
        mutex_enter(vp->v_interlock);
-       if ((vp->v_iflag & VI_EXECMAP) != 0 && vp->v_uobj.uo_npages != 0) {
+       if ((vp->v_iflag & VI_EXECMAP) != 0) {
                cpu_count(CPU_COUNT_EXECPAGES, -vp->v_uobj.uo_npages);
        }
        vp->v_iflag &= ~(VI_TEXT|VI_EXECMAP);



Home | Main Index | Thread Index | Old Index