Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/genfs genfs_getpages: restore vm_page array corre...
details: https://anonhg.NetBSD.org/src/rev/643b6166172f
branches: trunk
changeset: 758355:643b6166172f
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Wed Nov 03 04:32:50 2010 +0000
description:
genfs_getpages: restore vm_page array correctly in PGO_LOCKED error
code path.
diffstat:
sys/miscfs/genfs/genfs_io.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r d379a7a19e01 -r 643b6166172f sys/miscfs/genfs/genfs_io.c
--- a/sys/miscfs/genfs/genfs_io.c Wed Nov 03 02:40:34 2010 +0000
+++ b/sys/miscfs/genfs/genfs_io.c Wed Nov 03 04:32:50 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_io.c,v 1.40 2010/09/01 16:56:19 chs Exp $ */
+/* $NetBSD: genfs_io.c,v 1.41 2010/11/03 04:32:50 uebayasi Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.40 2010/09/01 16:56:19 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.41 2010/11/03 04:32:50 uebayasi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -236,9 +236,10 @@
for (i = 0; i < npages; i++) {
pg = ap->a_m[i];
- if (pg != NULL || pg != PGO_DONTCARE) {
+ if (pg != NULL && pg != PGO_DONTCARE) {
ap->a_m[i] = NULL;
}
+ KASSERT(pg == NULL || pg == PGO_DONTCARE);
}
} else {
genfs_node_unlock(vp);
Home |
Main Index |
Thread Index |
Old Index