MFgem r251960: re-check the mgt device object for the requested page
after the object was relocked. Tested by: dumbbell Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
49c1fb04b2
commit
18ec23deea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=253710
@ -102,7 +102,7 @@ ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offset,
|
||||
struct ttm_buffer_object *bo = vm_obj->handle;
|
||||
struct ttm_bo_device *bdev = bo->bdev;
|
||||
struct ttm_tt *ttm = NULL;
|
||||
vm_page_t m, oldm;
|
||||
vm_page_t m, m1, oldm;
|
||||
int ret;
|
||||
int retval = VM_PAGER_OK;
|
||||
struct ttm_mem_type_manager *man =
|
||||
@ -220,7 +220,14 @@ ttm_bo_vm_fault(vm_object_t vm_obj, vm_ooffset_t offset,
|
||||
}
|
||||
m->valid = VM_PAGE_BITS_ALL;
|
||||
*mres = m;
|
||||
vm_page_insert(m, vm_obj, OFF_TO_IDX(offset));
|
||||
m1 = vm_page_lookup(vm_obj, OFF_TO_IDX(offset));
|
||||
if (m1 == NULL) {
|
||||
vm_page_insert(m, vm_obj, OFF_TO_IDX(offset));
|
||||
} else {
|
||||
KASSERT(m == m1,
|
||||
("inconsistent insert bo %p m %p m1 %p offset %jx",
|
||||
bo, m, m1, (uintmax_t)offset));
|
||||
}
|
||||
vm_page_busy(m);
|
||||
|
||||
if (oldm != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user