diff options
author | kib <kib@FreeBSD.org> | 2009-02-08 20:39:17 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-02-08 20:39:17 +0000 |
commit | ae7c4cfa1196d4f42be0f573c827a5dd2d385af9 (patch) | |
tree | 090d271c805930a672a18b2da7d0cd0774d02586 /sys/vm/vm_map.h | |
parent | 9a341e28ebd8cb82b35c8eeb849a7607597d399e (diff) | |
download | FreeBSD-src-ae7c4cfa1196d4f42be0f573c827a5dd2d385af9.zip FreeBSD-src-ae7c4cfa1196d4f42be0f573c827a5dd2d385af9.tar.gz |
Do not call vm_object_deallocate() from vm_map_delete(), because we
hold the map lock there, and might need the vnode lock for OBJT_VNODE
objects. Postpone object deallocation until caller of vm_map_delete()
drops the map lock. Link the map entries to be freed into the freelist,
that is released by the new helper function vm_map_entry_free_freelist().
Reviewed by: tegge, alc
Tested by: pho
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 0c3ddc8..82de3ad 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -157,6 +157,8 @@ vm_map_entry_system_wired_count(vm_map_entry_t entry) { return (entry->wired_count - vm_map_entry_user_wired_count(entry)); } + +void vm_map_entry_free_freelist(vm_map_t map, vm_map_entry_t freelist); #endif /* _KERNEL */ /* @@ -336,7 +338,7 @@ long vmspace_wired_count(struct vmspace *vmspace); #ifdef _KERNEL boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); -int vm_map_delete (vm_map_t, vm_offset_t, vm_offset_t); +int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t, vm_map_entry_t *); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, int, vm_prot_t, vm_prot_t, int); int vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, |