Module Name: src
Committed By: yamt
Date: Wed Jan 11 00:09:51 UTC 2012
Modified Files:
src/sys/uvm [yamt-pagecache]: uvm_loan.c
Log Message:
turn an error return to an assertion
To generate a diff of this commit:
cvs rdiff -u -r1.81.2.10 -r1.81.2.11 src/sys/uvm/uvm_loan.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_loan.c
diff -u src/sys/uvm/uvm_loan.c:1.81.2.10 src/sys/uvm/uvm_loan.c:1.81.2.11
--- src/sys/uvm/uvm_loan.c:1.81.2.10 Wed Jan 11 00:08:41 2012
+++ src/sys/uvm/uvm_loan.c Wed Jan 11 00:09:51 2012
@@ -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 @@ uvm_loanobj_read(struct vm_map *map, vad
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.