Module Name: src
Committed By: rmind
Date: Wed Aug 17 20:46:27 UTC 2011
Modified Files:
src/sys/uvm: uvm_amap.c
Log Message:
amap_cow_now: just free the fresh anon on error, no need to dispose it.
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/uvm/uvm_amap.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_amap.c
diff -u src/sys/uvm/uvm_amap.c:1.102 src/sys/uvm/uvm_amap.c:1.103
--- src/sys/uvm/uvm_amap.c:1.102 Sat Aug 6 17:25:03 2011
+++ src/sys/uvm/uvm_amap.c Wed Aug 17 20:46:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_amap.c,v 1.102 2011/08/06 17:25:03 rmind Exp $ */
+/* $NetBSD: uvm_amap.c,v 1.103 2011/08/17 20:46:27 rmind Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.102 2011/08/06 17:25:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.103 2011/08/17 20:46:27 rmind Exp $");
#include "opt_uvmhist.h"
@@ -1039,17 +1039,11 @@
npg = NULL;
}
if (nanon == NULL || npg == NULL) {
-
- /*
- * XXXCDC: we should cause fork to fail, but we can't.
- */
-
+ amap_unlock(amap);
if (nanon) {
nanon->an_ref--;
KASSERT(nanon->an_ref == 0);
- uvm_anon_freelst(amap, nanon);
- } else {
- amap_unlock(amap);
+ uvm_anon_free(nanon);
}
uvm_wait("cownowpage");
goto ReStart;