diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-04 23:36:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-05 01:15:22 +0200 |
commit | e3e1d79a7d92b931892ecbe26761363b41cf6e96 (patch) | |
tree | 23cea90ebafb3493f8ddcd8fa395f9d00cc7589c /Kernel/Syscalls | |
parent | b36c3a68d8a034d15e4b9164e5d4d4cb82c0cbc7 (diff) | |
download | serenity-e3e1d79a7d92b931892ecbe26761363b41cf6e96.zip |
Kernel: Remove unused ShouldDeallocateVirtualRange parameters
Since there is no separate virtual range allocator anymore, this is
no longer used for anything.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/mmap.cpp | 15 | ||||
-rw-r--r-- | Kernel/Syscalls/sigaction.cpp | 12 |
2 files changed, 9 insertions, 18 deletions
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 42f199d1ef..8c95eb9a07 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -290,11 +290,9 @@ ErrorOr<FlatPtr> Process::sys$mprotect(Userspace<void*> addr, size_t size, int p TRY(validate_inode_mmap_prot(prot, static_cast<Memory::InodeVMObject const&>(old_region->vmobject()).inode(), old_region->is_shared())); // Remove the old region from our regions tree, since were going to add another region - // with the exact same start address, but do not deallocate it yet + // with the exact same start address. auto region = address_space().take_region(*old_region); - - // Unmap the old region here, specifying that we *don't* want the VM deallocated. - region->unmap(Memory::Region::ShouldDeallocateVirtualRange::No); + region->unmap(); // This vector is the region(s) adjacent to our range. // We need to allocate a new region for the range we wanted to change permission bits on. @@ -346,11 +344,9 @@ ErrorOr<FlatPtr> Process::sys$mprotect(Userspace<void*> addr, size_t size, int p continue; } // Remove the old region from our regions tree, since were going to add another region - // with the exact same start address, but dont deallocate it yet + // with the exact same start address. auto region = address_space().take_region(*old_region); - - // Unmap the old region here, specifying that we *don't* want the VM deallocated. - region->unmap(Memory::Region::ShouldDeallocateVirtualRange::No); + region->unmap(); // This vector is the region(s) adjacent to our range. // We need to allocate a new region for the range we wanted to change permission bits on. @@ -467,8 +463,7 @@ ErrorOr<FlatPtr> Process::sys$mremap(Userspace<Syscall::SC_mremap_params const*> auto new_vmobject = TRY(Memory::PrivateInodeVMObject::try_create_with_inode(inode)); auto old_name = old_region->take_name(); - // Unmap without deallocating the VM range since we're going to reuse it. - old_region->unmap(Memory::Region::ShouldDeallocateVirtualRange::No); + old_region->unmap(); address_space().deallocate_region(*old_region); auto* new_region = TRY(address_space().allocate_region_with_vmobject(range, move(new_vmobject), old_offset, old_name->view(), old_prot, false)); diff --git a/Kernel/Syscalls/sigaction.cpp b/Kernel/Syscalls/sigaction.cpp index 888be45529..38c5cd19ff 100644 --- a/Kernel/Syscalls/sigaction.cpp +++ b/Kernel/Syscalls/sigaction.cpp @@ -156,11 +156,9 @@ ErrorOr<void> Process::remap_range_as_stack(FlatPtr address, size_t size) return EINVAL; // Remove the old region from our regions tree, since were going to add another region - // with the exact same start address, but do not deallocate it yet + // with the exact same start address. auto region = address_space().take_region(*old_region); - - // Unmap the old region here, specifying that we *don't* want the VM deallocated. - region->unmap(Memory::Region::ShouldDeallocateVirtualRange::No); + region->unmap(); // This vector is the region(s) adjacent to our range. // We need to allocate a new region for the range we wanted to change permission bits on. @@ -214,11 +212,9 @@ ErrorOr<void> Process::remap_range_as_stack(FlatPtr address, size_t size) continue; } // Remove the old region from our regions tree, since were going to add another region - // with the exact same start address, but dont deallocate it yet + // with the exact same start address. auto region = address_space().take_region(*old_region); - - // Unmap the old region here, specifying that we *don't* want the VM deallocated. - region->unmap(Memory::Region::ShouldDeallocateVirtualRange::No); + region->unmap(); // This vector is the region(s) adjacent to our range. // We need to allocate a new region for the range we wanted to change permission bits on. |