summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/lseek.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-01-29 01:22:28 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-29 02:17:06 +0100
commit8ebec2938cd43d16655404ba86b20c73bfb724a7 (patch)
tree66af99284c69870ffc150c4137dedf8811147f3a /Kernel/Syscalls/lseek.cpp
parent93e90e16c3857badd86991b8dcca4c5ebc3ed5a7 (diff)
downloadserenity-8ebec2938cd43d16655404ba86b20c73bfb724a7.zip
Kernel: Convert process file descriptor table to a SpinlockProtected
Instead of manually locking in the various member functions of Process::OpenFileDescriptions, simply wrap it in a SpinlockProtected.
Diffstat (limited to 'Kernel/Syscalls/lseek.cpp')
-rw-r--r--Kernel/Syscalls/lseek.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/lseek.cpp b/Kernel/Syscalls/lseek.cpp
index e2ed624f80..2422dce950 100644
--- a/Kernel/Syscalls/lseek.cpp
+++ b/Kernel/Syscalls/lseek.cpp
@@ -13,7 +13,7 @@ ErrorOr<FlatPtr> Process::sys$lseek(int fd, Userspace<off_t*> userspace_offset,
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
TRY(require_promise(Pledge::stdio));
- auto description = TRY(fds().open_file_description(fd));
+ auto description = TRY(open_file_description(fd));
off_t offset;
TRY(copy_from_user(&offset, userspace_offset));
auto seek_result = TRY(description->seek(offset, whence));