Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-pagecache]: src/sys/uvm fix DEBUG code
details: https://anonhg.NetBSD.org/src/rev/a6aa02b47f22
branches: yamt-pagecache
changeset: 770879:a6aa02b47f22
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Apr 18 13:40:44 2012 +0000
description:
fix DEBUG code
diffstat:
sys/uvm/uvm_page_array.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 33bd850fb303 -r a6aa02b47f22 sys/uvm/uvm_page_array.c
--- a/sys/uvm/uvm_page_array.c Wed Apr 18 13:40:06 2012 +0000
+++ b/sys/uvm/uvm_page_array.c Wed Apr 18 13:40:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page_array.c,v 1.1.2.4 2012/01/18 02:09:06 yamt Exp $ */
+/* $NetBSD: uvm_page_array.c,v 1.1.2.5 2012/04/18 13:40:44 yamt Exp $ */
/*-
* Copyright (c)2011 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page_array.c,v 1.1.2.4 2012/01/18 02:09:06 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page_array.c,v 1.1.2.5 2012/04/18 13:40:44 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -168,8 +168,15 @@
KASSERT(pg != NULL);
KASSERT(pg->uobject == uobj);
- KASSERT(pg->offset >= off);
- KASSERT(i == 0 || pg->offset > ar->ar_pages[i - 1]->offset);
+ if (backward) {
+ KASSERT(pg->offset <= off);
+ KASSERT(i == 0 ||
+ pg->offset < ar->ar_pages[i - 1]->offset);
+ } else {
+ KASSERT(pg->offset >= off);
+ KASSERT(i == 0 ||
+ pg->offset > ar->ar_pages[i - 1]->offset);
+ }
}
#endif /* defined(DEBUG) */
return 0;
Home |
Main Index |
Thread Index |
Old Index