| 120 | } |
| 121 | |
| 122 | static void |
| 123 | sg_pager_dealloc(vm_object_t object) |
| 124 | { |
| 125 | struct sglist *sg; |
| 126 | vm_page_t m; |
| 127 | |
| 128 | /* |
| 129 | * Free up our fake pages. |
| 130 | */ |
| 131 | while ((m = TAILQ_FIRST(&object->un_pager.sgp.sgp_pglist)) != 0) { |
| 132 | if (vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL) == 0) |
| 133 | continue; |
| 134 | TAILQ_REMOVE(&object->un_pager.sgp.sgp_pglist, m, plinks.q); |
| 135 | vm_page_putfake(m); |
| 136 | } |
| 137 | |
| 138 | sg = object->handle; |
| 139 | sglist_free(sg); |
| 140 | object->handle = NULL; |
| 141 | object->type = OBJT_DEAD; |
| 142 | } |
| 143 | |
| 144 | static int |
| 145 | sg_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, |
nothing calls this directly
no test coverage detected