From 4d42eff4e189802521e754428654ca220dc78610 Mon Sep 17 00:00:00 2001 From: pooka Date: Sun, 5 Aug 2007 10:19:23 +0000 Subject: [PATCH] In uao_get(), drop object lock only after dropswap to avoid KASSERT panic. Should fix tmpfs problem reported by riz on current-users. yamt ok. --- sys/uvm/uvm_aobj.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 8e89e2e56c9a..83af2058f0c4 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_aobj.c,v 1.92 2007/07/24 19:59:35 ad Exp $ */ +/* $NetBSD: uvm_aobj.c,v 1.93 2007/08/05 10:19:23 pooka Exp $ */ /* * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.92 2007/07/24 19:59:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.93 2007/08/05 10:19:23 pooka Exp $"); #include "opt_uvmhist.h" @@ -400,11 +400,13 @@ uao_free(struct uvm_aobj *aobj) { int swpgonlydelta = 0; +#if defined(VMSWAP) + uao_dropswap_range1(aobj, 0, 0); +#endif /* defined(VMSWAP) */ + simple_unlock(&aobj->u_obj.vmobjlock); #if defined(VMSWAP) - uao_dropswap_range1(aobj, 0, 0); - if (UAO_USES_SWHASH(aobj)) { /*