Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm uvm: Simplify assertion in uvn_get.



details:   https://anonhg.NetBSD.org/src/rev/1cdd8b69edf2
branches:  trunk
changeset: 374195:1cdd8b69edf2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Apr 09 12:37:12 2023 +0000

description:
uvm: Simplify assertion in uvn_get.

No functional change intended.

diffstat:

 sys/uvm/uvm_vnode.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 84af62fa5cdd -r 1cdd8b69edf2 sys/uvm/uvm_vnode.c
--- a/sys/uvm/uvm_vnode.c       Sun Apr 09 12:33:58 2023 +0000
+++ b/sys/uvm/uvm_vnode.c       Sun Apr 09 12:37:12 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_vnode.c,v 1.119 2023/04/09 09:00:56 riastradh Exp $        */
+/*     $NetBSD: uvm_vnode.c,v 1.120 2023/04/09 12:37:12 riastradh Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.119 2023/04/09 09:00:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.120 2023/04/09 12:37:12 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_uvmhist.h"
@@ -189,8 +189,8 @@ uvn_get(struct uvm_object *uobj, voff_t 
        error = VOP_GETPAGES(vp, offset, pps, npagesp, centeridx,
                             access_type, advice, flags);
 
-       KASSERT(((flags & PGO_LOCKED) != 0 && rw_lock_held(uobj->vmobjlock)) ||
-           (flags & PGO_LOCKED) == 0);
+       if (flags & PGO_LOCKED)
+               KASSERT(rw_lock_held(uobj->vmobjlock));
        return error;
 }
 



Home | Main Index | Thread Index | Old Index