Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm only check that npages fit, if we are going to add n...
details: https://anonhg.NetBSD.org/src/rev/a64b5b9c1ce2
branches: trunk
changeset: 327198:a64b5b9c1ce2
user: christos <christos%NetBSD.org@localhost>
date: Sat Mar 01 18:32:01 2014 +0000
description:
only check that npages fit, if we are going to add npages to swpgonly.
diffstat:
sys/uvm/uvm_pager.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 4b54caeba95f -r a64b5b9c1ce2 sys/uvm/uvm_pager.c
--- a/sys/uvm/uvm_pager.c Sat Mar 01 17:27:48 2014 +0000
+++ b/sys/uvm/uvm_pager.c Sat Mar 01 18:32:01 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pager.c,v 1.109 2013/10/25 20:27:29 martin Exp $ */
+/* $NetBSD: uvm_pager.c,v 1.110 2014/03/01 18:32:01 christos Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.109 2013/10/25 20:27:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.110 2014/03/01 18:32:01 christos Exp $");
#include "opt_uvmhist.h"
#include "opt_readahead.h"
@@ -468,9 +468,10 @@
/* these pages are now only in swap. */
mutex_enter(&uvm_swap_data_lock);
- KASSERT(uvmexp.swpgonly + npages <= uvmexp.swpginuse);
- if (error != ENOMEM)
+ if (error != ENOMEM) {
+ KASSERT(uvmexp.swpgonly + npages <= uvmexp.swpginuse);
uvmexp.swpgonly += npages;
+ }
mutex_exit(&uvm_swap_data_lock);
if (error) {
if (error != ENOMEM)
Home |
Main Index |
Thread Index |
Old Index