Source-Changes-HG archive

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

[src/yamt-pagecache]: src/sys/uvm turn an error return to an assertion



details:   https://anonhg.NetBSD.org/src/rev/fcdcae8bda6c
branches:  yamt-pagecache
changeset: 770859:fcdcae8bda6c
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Jan 11 00:09:51 2012 +0000

description:
turn an error return to an assertion

diffstat:

 sys/uvm/uvm_loan.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r f866e864b47b -r fcdcae8bda6c sys/uvm/uvm_loan.c
--- a/sys/uvm/uvm_loan.c        Wed Jan 11 00:08:40 2012 +0000
+++ b/sys/uvm/uvm_loan.c        Wed Jan 11 00:09:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_loan.c,v 1.81.2.10 2012/01/11 00:08:41 yamt Exp $  */
+/*     $NetBSD: uvm_loan.c,v 1.81.2.11 2012/01/11 00:09:51 yamt Exp $  */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.81.2.10 2012/01/11 00:08:41 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.81.2.11 2012/01/11 00:09:51 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1391,9 +1391,7 @@
        UVMHIST_LOG(ubchist, "map %p va 0x%x npages %d", map, va, npages, 0);
        UVMHIST_LOG(ubchist, "uobj %p off 0x%x", uobj, off, 0, 0);
 
-       if (npages > MAXPAGES) {
-               return EINVAL;
-       }
+       KASSERT(npages <= MAXPAGES);
 #if defined(PMAP_PREFER)
        /*
         * avoid creating VAC aliases.



Home | Main Index | Thread Index | Old Index