Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm in amap_alloc(), only put the amap on the list of am...



details:   https://anonhg.NetBSD.org/src/rev/d3a66deba3b6
branches:  trunk
changeset: 587289:d3a66deba3b6
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Jan 18 17:03:36 2006 +0000

description:
in amap_alloc(), only put the amap on the list of amaps if we succeeded
in allocating it.

diffstat:

 sys/uvm/uvm_amap.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r f17ed91581dd -r d3a66deba3b6 sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c        Wed Jan 18 14:26:55 2006 +0000
+++ b/sys/uvm/uvm_amap.c        Wed Jan 18 17:03:36 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_amap.c,v 1.68 2005/12/24 20:45:10 perry Exp $      */
+/*     $NetBSD: uvm_amap.c,v 1.69 2006/01/18 17:03:36 chs Exp $        */
 
 /*
  *
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.68 2005/12/24 20:45:10 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.69 2006/01/18 17:03:36 chs Exp $");
 
 #undef UVM_AMAP_INLINE         /* enable/disable amap inlines */
 
@@ -250,11 +250,11 @@
        AMAP_B2SLOT(padslots, padsz);
 
        amap = amap_alloc1(slots, padslots, waitf);
-       if (amap)
+       if (amap) {
                memset(amap->am_anon, 0,
                    amap->am_maxslot * sizeof(struct vm_anon *));
-
-       amap_list_insert(amap);
+               amap_list_insert(amap);
+       }
 
        UVMHIST_LOG(maphist,"<- done, amap = 0x%x, sz=%d", amap, sz, 0, 0);
        return(amap);



Home | Main Index | Thread Index | Old Index