diff options
author | Liav A <liavalb@gmail.com> | 2021-06-22 21:22:17 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-29 20:53:59 +0200 |
commit | 7c87891c06e37f217b5fde17a3fc869306da659b (patch) | |
tree | 3017e40cfb6fbbd01e1f0b36b483003d498c189c /Kernel/Syscalls/mmap.cpp | |
parent | 12b6e6915034a0c0d1981caf419a35c0a8cd247e (diff) | |
download | serenity-7c87891c06e37f217b5fde17a3fc869306da659b.zip |
Kernel: Don't copy a Vector<FileDescriptionAndFlags>
Instead of copying a Vector everytime we need to enumerate a Process'
file descriptions, we can just temporarily lock so it won't change.
Diffstat (limited to 'Kernel/Syscalls/mmap.cpp')
-rw-r--r-- | Kernel/Syscalls/mmap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 79353249ae..f88bc4d51e 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -224,7 +224,7 @@ KResultOr<FlatPtr> Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> u return EINVAL; if (static_cast<size_t>(offset) & ~PAGE_MASK) return EINVAL; - auto description = file_description(fd); + auto description = fds().file_description(fd); if (!description) return EBADF; if (description->is_directory()) |