aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2010-05-20 16:21:19 +0000
committerAlan Cox <alc@FreeBSD.org>2010-05-20 16:21:19 +0000
commitb28c6ddbbcc319ef6379eaa4b4b52efc3f03959f (patch)
treeda382c6a8d4fdd555d6e854053b2bb4b36ed0358 /sys/vm
parent830ca8ea8c9a8fda03fe028acf0d8191a55c00b3 (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_object.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 7e4dbc853507..c25ab775794f 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1162,7 +1162,8 @@ shadowlookup:
(tobject->flags & OBJ_ONEMAPPING) == 0) {
goto unlock_tobject;
}
- }
+ } else if (tobject->type == OBJT_PHYS)
+ goto unlock_tobject;
m = vm_page_lookup(tobject, tpindex);
if (m == NULL && advise == MADV_WILLNEED) {
/*
@@ -1189,18 +1190,13 @@ shadowlookup:
VM_OBJECT_UNLOCK(tobject);
tobject = backing_object;
goto shadowlookup;
- }
+ } else if (m->valid != VM_PAGE_BITS_ALL)
+ goto unlock_tobject;
/*
- * If the page is busy or not in a normal active state,
- * we skip it. If the page is not managed there are no
- * page queues to mess with. Things can break if we mess
- * with pages in any of the below states.
+ * If the page is not in a normal state, skip it.
*/
vm_page_lock_queues();
- if (m->hold_count ||
- m->wire_count ||
- (m->flags & PG_UNMANAGED) ||
- m->valid != VM_PAGE_BITS_ALL) {
+ if (m->hold_count != 0 || m->wire_count != 0) {
vm_page_unlock_queues();
goto unlock_tobject;
}