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.)
This commit is contained in:
parent
7758932884
commit
569ccdf52b
@ -948,8 +948,7 @@ exec_map_first_page(imgp)
|
||||
initial_pagein = i;
|
||||
rv = vm_pager_get_pages(object, ma, initial_pagein, 0);
|
||||
ma[0] = vm_page_lookup(object, 0);
|
||||
if ((rv != VM_PAGER_OK) || (ma[0] == NULL) ||
|
||||
(ma[0]->valid == 0)) {
|
||||
if ((rv != VM_PAGER_OK) || (ma[0] == NULL)) {
|
||||
if (ma[0]) {
|
||||
vm_page_lock_queues();
|
||||
vm_page_free(ma[0]);
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user