Kernel: Mark sys$fcntl as not needing the big lock

This syscall operates on the file descriptor table, and on individual
open file descriptions. Both of those are already protected by scoped
locking mechanisms.
This commit is contained in:
Andreas Kling 2023-04-03 13:28:50 +02:00
parent 6132193bd4
commit 775e6d6865
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ enum class NeedsBigProcessLock {
S(fchdir, NeedsBigProcessLock::No) \
S(fchmod, NeedsBigProcessLock::No) \
S(fchown, NeedsBigProcessLock::No) \
S(fcntl, NeedsBigProcessLock::Yes) \
S(fcntl, NeedsBigProcessLock::No) \
S(fork, NeedsBigProcessLock::Yes) \
S(fstat, NeedsBigProcessLock::No) \
S(fstatvfs, NeedsBigProcessLock::No) \

View file

@ -12,7 +12,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$fcntl(int fd, int cmd, uintptr_t arg)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::stdio));
dbgln_if(IO_DEBUG, "sys$fcntl: fd={}, cmd={}, arg={}", fd, cmd, arg);
auto description = TRY(open_file_description(fd));