Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/src/linux_compat.c
Show First 20 Lines • Show All 502 Lines • ▼ Show 20 Lines | if (((*mres)->flags & PG_FICTITIOUS) != 0) { | ||||
* Replace the passed in "mres" page with our | * Replace the passed in "mres" page with our | ||||
* own fake page and free up the all of the | * own fake page and free up the all of the | ||||
* original pages. | * original pages. | ||||
*/ | */ | ||||
VM_OBJECT_WUNLOCK(vm_obj); | VM_OBJECT_WUNLOCK(vm_obj); | ||||
page = vm_page_getfake(paddr, vm_obj->memattr); | page = vm_page_getfake(paddr, vm_obj->memattr); | ||||
VM_OBJECT_WLOCK(vm_obj); | VM_OBJECT_WLOCK(vm_obj); | ||||
vm_page_replace_checked(page, vm_obj, | vm_page_replace(page, vm_obj, (*mres)->pindex, *mres); | ||||
(*mres)->pindex, *mres); | |||||
vm_page_free(*mres); | |||||
*mres = page; | *mres = page; | ||||
} | } | ||||
vm_page_valid(page); | vm_page_valid(page); | ||||
return (VM_PAGER_OK); | return (VM_PAGER_OK); | ||||
} | } | ||||
return (VM_PAGER_FAIL); | return (VM_PAGER_FAIL); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,936 Lines • Show Last 20 Lines |