summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_glue.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-06-06 20:13:14 +0000
committeralc <alc@FreeBSD.org>2009-06-06 20:13:14 +0000
commit569ccdf52be50bb7cedd94c58eb9107022d1506f (patch)
treefd2fc1bd5d784f6e6b3183645ef3942de635ce56 /sys/vm/vm_glue.c
parent7758932884199b8e72ce2ee07f29a0a6614451ce (diff)
downloadFreeBSD-src-569ccdf52be50bb7cedd94c58eb9107022d1506f.zip
FreeBSD-src-569ccdf52be50bb7cedd94c58eb9107022d1506f.tar.gz
If vm_pager_get_pages() returns VM_PAGER_OK, then there is no need to check
the page's valid bits. The page is guaranteed to be fully valid. (For the record, this is documented in vm/vm_pager.h's comments.)
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r--sys/vm/vm_glue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 17a7700..b9a9ae7 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -259,7 +259,7 @@ vm_imgact_hold_page(vm_object_t object, vm_ooffset_t offset)
m = vm_page_lookup(object, pindex);
if (m == NULL)
goto out;
- if (m->valid == 0 || rv != VM_PAGER_OK) {
+ if (rv != VM_PAGER_OK) {
vm_page_lock_queues();
vm_page_free(m);
vm_page_unlock_queues();
OpenPOWER on IntegriCloud