From 41227241473765b6e3e22fcc7c0aa0f202c662d4 Mon Sep 17 00:00:00 2001 From: miod Date: Tue, 13 Feb 2024 10:16:28 +0000 Subject: [PATCH] Remove sanity checks from uvm_pagefree(). The first thing this function does is invoke uvm_pageclean(), which performs the exact same sanity check, so one set of checks is enough. ok mpi@ --- sys/uvm/uvm_page.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 774345acc2c..b9e69522d46 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.c,v 1.173 2023/08/12 07:22:56 mpi Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.174 2024/02/13 10:16:28 miod Exp $ */ /* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */ /* @@ -1024,10 +1024,6 @@ uvm_pageclean(struct vm_page *pg) void uvm_pagefree(struct vm_page *pg) { - if ((pg->pg_flags & (PG_TABLED|PQ_ACTIVE|PQ_INACTIVE)) && - (pg->uobject == NULL || !UVM_OBJ_IS_PMAP(pg->uobject))) - MUTEX_ASSERT_LOCKED(&uvm.pageqlock); - uvm_pageclean(pg); uvm_pmr_freepages(pg, 1); } -- 2.20.1