summaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-01-09 02:01:11 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-01-09 02:01:11 +0000
commite0a9a92990e8a61dcbd91dbed8758431e1060d06 (patch)
tree8bdd5be2124cb7c0a37a31b9337f45f4b0b3dca4 /sys/vm
parentaa6d5275f0ffd08ccfd187502ba7b650a051de19 (diff)
Fix to a VM cache trash bug by Chuck Cranor
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 8c83bd3e377..f606ca0cd4b 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_map.c,v 1.15 1998/04/25 20:15:13 niklas Exp $ */
+/* $OpenBSD: vm_map.c,v 1.16 1999/01/09 02:01:10 niklas Exp $ */
/* $NetBSD: vm_map.c,v 1.23 1996/02/10 00:08:08 christos Exp $ */
/*
@@ -1529,12 +1529,10 @@ vm_map_clean(map, start, end, syncio, invalidate)
vm_object_lock(object);
}
/*
- * Flush pages if writing is allowed.
* XXX should we continue on an error?
*/
- if ((current->protection & VM_PROT_WRITE) &&
- !vm_object_page_clean(object, offset, offset+size,
- syncio, FALSE)) {
+ if (!vm_object_page_clean(object, offset, offset+size, syncio,
+ FALSE)) {
vm_object_unlock(object);
vm_map_unlock_read(map);
return(KERN_FAILURE);