Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/subr_pool.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- src/sys/kern/subr_pool.c 1998/08/01 23:44:21 1.6 +++ src/sys/kern/subr_pool.c 1998/08/02 04:34:46 1.7 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.6 1998/08/01 23:44:21 thorpej Exp $ */ +/* $NetBSD: subr_pool.c,v 1.7 1998/08/02 04:34:46 thorpej Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -226,13 +226,8 @@ pr_rmpage(pp, ph) { /* - * Unlink a page from the pool and release it. + * If the page was idle, decrement the idle page count. */ - TAILQ_REMOVE(&pp->pr_pagelist, ph, ph_pagelist); - (*pp->pr_free)(ph->ph_page, pp->pr_pagesz, pp->pr_mtype); - pp->pr_npages--; - pp->pr_npagefree++; - if (ph->ph_nmissing == 0) { #ifdef DIAGNOSTIC if (pp->pr_nidle == 0) @@ -241,6 +236,14 @@ pr_rmpage(pp, ph) pp->pr_nidle--; } + /* + * Unlink a page from the pool and release it. + */ + TAILQ_REMOVE(&pp->pr_pagelist, ph, ph_pagelist); + (*pp->pr_free)(ph->ph_page, pp->pr_pagesz, pp->pr_mtype); + pp->pr_npages--; + pp->pr_npagefree++; + if ((pp->pr_flags & PR_PHINPAGE) == 0) { LIST_REMOVE(ph, ph_hashlist); pool_put(&phpool, ph);