vm: controller: implement detach of vm-object whose attachment was deferred
This commit is contained in:
@@ -216,6 +216,15 @@ kern_status_t vm_controller_detach_object(
|
|||||||
return KERN_INVALID_ARGUMENT;
|
return KERN_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vmo->vo_key == 0) {
|
||||||
|
/* this vmo isn't actually attached to this controller yet.
|
||||||
|
* this can happen if a controller-attached vmo was duplicated
|
||||||
|
* via copy-on-write, and the duplicate vmo has not yet been
|
||||||
|
* accessed. */
|
||||||
|
vmo->vo_ctrl = NULL;
|
||||||
|
return KERN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
struct page_request *req
|
struct page_request *req
|
||||||
= vm_cache_alloc(&page_request_cache, VM_NORMAL);
|
= vm_cache_alloc(&page_request_cache, VM_NORMAL);
|
||||||
req->req_type = PAGE_REQUEST_DETACH;
|
req->req_type = PAGE_REQUEST_DETACH;
|
||||||
|
|||||||
Reference in New Issue
Block a user