The local variable "rv" is still required by vm_fault_hold_user_pages().

This commit is contained in:
Alan Cox 2010-12-20 23:41:31 +00:00
parent 6a6760db7f
commit c2f86e4192
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216607

View File

@ -66,7 +66,7 @@ vm_fault_hold_user_pages(vm_map_t map, vm_offset_t addr, vm_page_t *mp,
int count, vm_prot_t prot)
{
vm_offset_t end, va;
int faults;
int faults, rv;
pmap_t pmap;
vm_page_t m, *pages;
@ -124,8 +124,8 @@ vm_fault_hold_user_pages(vm_map_t map, vm_offset_t addr, vm_page_t *mp,
* trigger a fault where neccessary
*/
for (pages = mp, va = addr; va < end; va += PAGE_SIZE, pages++) {
if (*pages == NULL && vm_fault_hold(map, va, prot,
VM_FAULT_NORMAL, pages) != KERN_SUCCESS)
if (*pages == NULL && (rv = vm_fault_hold(map, va, prot,
VM_FAULT_NORMAL, pages)) != KERN_SUCCESS)
goto error;
}
return (0);