From: dv Date: Mon, 20 May 2024 17:03:36 +0000 (+0000) Subject: Remove always-false condition in amap_free KASSERT. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2a6ea202e4433f5d8e6c28370bc7fa3140a41fb3;p=openbsd Remove always-false condition in amap_free KASSERT. The if-condition immediately preceding it already checks the value so the first part of the KASSERT is redundant. ok mpi@, miod@, jca@ --- diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c index 1d1a5f7b2fe..d9296efad06 100644 --- a/sys/uvm/uvm_amap.c +++ b/sys/uvm/uvm_amap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_amap.c,v 1.94 2024/04/17 13:17:31 mpi Exp $ */ +/* $OpenBSD: uvm_amap.c,v 1.95 2024/05/20 17:03:36 dv Exp $ */ /* $NetBSD: uvm_amap.c,v 1.27 2000/11/25 06:27:59 chs Exp $ */ /* @@ -450,7 +450,7 @@ amap_free(struct vm_amap *amap) KASSERT((amap->am_flags & AMAP_SWAPOFF) == 0); if (amap->am_lock != NULL) { - KASSERT(amap->am_lock == NULL || !rw_write_held(amap->am_lock)); + KASSERT(!rw_write_held(amap->am_lock)); rw_obj_free(amap->am_lock); }