From a812fa9bc487ec328eb4ce4e15f2970720e4886d Mon Sep 17 00:00:00 2001 From: riastradh Date: Sun, 9 Apr 2023 12:37:12 +0000 Subject: [PATCH] uvm: Simplify assertion in uvn_get. No functional change intended. --- sys/uvm/uvm_vnode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 5a21bd0c7ca9..5f31467d844c 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -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 -__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 offset, 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; }