Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm don't use the list pointers after we take an object ...



details:   https://anonhg.NetBSD.org/src/rev/28369a589749
branches:  trunk
changeset: 511590:28369a589749
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Jun 22 06:20:24 2001 +0000

description:
don't use the list pointers after we take an object off its list.

diffstat:

 sys/uvm/uvm_aobj.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 9116f2f6f21b -r 28369a589749 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c        Fri Jun 22 06:18:22 2001 +0000
+++ b/sys/uvm/uvm_aobj.c        Fri Jun 22 06:20:24 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_aobj.c,v 1.43 2001/05/26 21:27:20 chs Exp $        */
+/*     $NetBSD: uvm_aobj.c,v 1.44 2001/06/22 06:20:24 chs Exp $        */
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -662,7 +662,7 @@
        struct uvm_object *uobj;
 {
        struct uvm_aobj *aobj = (struct uvm_aobj *)uobj;
-       struct vm_page *pg;
+       struct vm_page *pg, *nextpg;
        boolean_t busybody;
        UVMHIST_FUNC("uao_detach"); UVMHIST_CALLED(maphist);
 
@@ -694,9 +694,8 @@
         * mark for release any that are.
         */
        busybody = FALSE;
-       for (pg = TAILQ_FIRST(&uobj->memq);
-            pg != NULL;
-            pg = TAILQ_NEXT(pg, listq)) {
+       for (pg = TAILQ_FIRST(&uobj->memq); pg != NULL; pg = nextpg) {
+               nextpg = TAILQ_NEXT(pg, listq);
                if (pg->flags & PG_BUSY) {
                        pg->flags |= PG_RELEASED;
                        busybody = TRUE;



Home | Main Index | Thread Index | Old Index