Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Undo the part of the last revision about pr_rmpage(...



details:   https://anonhg.NetBSD.org/src/rev/8a592360671d
branches:  trunk
changeset: 471548:8a592360671d
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Apr 04 17:17:31 1999 +0000

description:
Undo the part of the last revision about pr_rmpage() referencing
a data structure after it was freed.  This wasn't actually a problem,
and the change caused the wrong pool_item_header to be freed
in the non-PR_PHINPAGE case.

diffstat:

 sys/kern/subr_pool.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r b58312997329 -r 8a592360671d sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Sun Apr 04 16:57:36 1999 +0000
+++ b/sys/kern/subr_pool.c      Sun Apr 04 17:17:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.21 1999/03/31 23:23:48 thorpej Exp $   */
+/*     $NetBSD: subr_pool.c,v 1.22 1999/04/04 17:17:31 chs Exp $       */
 
 /*-
  * Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -254,6 +254,11 @@
        pp->pr_npages--;
        pp->pr_npagefree++;
 
+       if ((pp->pr_roflags & PR_PHINPAGE) == 0) {
+               LIST_REMOVE(ph, ph_hashlist);
+               pool_put(&phpool, ph);
+       }
+
        if (pp->pr_curpage == ph) {
                /*
                 * Find a new non-empty page header, if any.
@@ -267,11 +272,6 @@
 
                pp->pr_curpage = ph;
        }
-
-       if ((pp->pr_roflags & PR_PHINPAGE) == 0) {
-               LIST_REMOVE(ph, ph_hashlist);
-               pool_put(&phpool, ph);
-       }
 }
 
 /*



Home | Main Index | Thread Index | Old Index