| 613 | #define defer_next right |
| 614 | |
| 615 | static void |
| 616 | vm_map_process_deferred(void) |
| 617 | { |
| 618 | struct thread *td; |
| 619 | vm_map_entry_t entry, next; |
| 620 | vm_object_t object; |
| 621 | |
| 622 | td = curthread; |
| 623 | entry = td->td_map_def_user; |
| 624 | td->td_map_def_user = NULL; |
| 625 | while (entry != NULL) { |
| 626 | next = entry->defer_next; |
| 627 | MPASS((entry->eflags & (MAP_ENTRY_WRITECNT | |
| 628 | MAP_ENTRY_VN_EXEC)) != (MAP_ENTRY_WRITECNT | |
| 629 | MAP_ENTRY_VN_EXEC)); |
| 630 | if ((entry->eflags & MAP_ENTRY_WRITECNT) != 0) { |
| 631 | /* |
| 632 | * Decrement the object's writemappings and |
| 633 | * possibly the vnode's v_writecount. |
| 634 | */ |
| 635 | KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, |
| 636 | ("Submap with writecount")); |
| 637 | object = entry->object.vm_object; |
| 638 | KASSERT(object != NULL, ("No object for writecount")); |
| 639 | vm_pager_release_writecount(object, entry->start, |
| 640 | entry->end); |
| 641 | } |
| 642 | vm_map_entry_set_vnode_text(entry, false); |
| 643 | vm_map_entry_deallocate(entry, FALSE); |
| 644 | entry = next; |
| 645 | } |
| 646 | } |
| 647 | |
| 648 | #ifdef INVARIANTS |
| 649 | static void |
no test coverage detected