From 6ec37434a94b1dbf5702af181fa18ba70d0801d5 Mon Sep 17 00:00:00 2001 From: mpi Date: Wed, 10 Apr 2024 15:25:14 +0000 Subject: [PATCH] Call uao_dropswap() instead of rerolling it. ok kn@, kettenis@, miod@ --- sys/uvm/uvm_aobj.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 490c94d6724..89389d5cabe 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_aobj.c,v 1.108 2023/05/13 09:24:59 mpi Exp $ */ +/* $OpenBSD: uvm_aobj.c,v 1.109 2024/04/10 15:25:14 mpi Exp $ */ /* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */ /* @@ -1398,7 +1398,7 @@ uao_pagein_page(struct uvm_aobj *aobj, int pageidx) { struct uvm_object *uobj = &aobj->u_obj; struct vm_page *pg; - int rv, slot, npages; + int rv, npages; pg = NULL; npages = 1; @@ -1429,8 +1429,7 @@ uao_pagein_page(struct uvm_aobj *aobj, int pageidx) * ok, we've got the page now. * mark it as dirty, clear its swslot and un-busy it. */ - slot = uao_set_swslot(&aobj->u_obj, pageidx, 0); - uvm_swap_free(slot, 1); + uao_dropswap(&aobj->u_obj, pageidx); atomic_clearbits_int(&pg->pg_flags, PG_BUSY|PG_CLEAN|PG_FAKE); UVM_PAGE_OWN(pg, NULL); -- 2.20.1