Kernel: Remove big lock from sys$close

This syscall doesn't access any unprotected shared data.
This commit is contained in:
Idan Horowitz 2022-04-09 22:49:20 +03:00 committed by Andreas Kling
parent 0297349922
commit 9547a8e8a2
Notes: sideshowbarker 2024-07-17 18:38:54 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ enum class NeedsBigProcessLock {
S(clock_gettime, NeedsBigProcessLock::No) \
S(clock_nanosleep, NeedsBigProcessLock::No) \
S(clock_settime, NeedsBigProcessLock::No) \
S(close, NeedsBigProcessLock::Yes) \
S(close, NeedsBigProcessLock::No) \
S(connect, NeedsBigProcessLock::Yes) \
S(create_inode_watcher, NeedsBigProcessLock::Yes) \
S(create_thread, NeedsBigProcessLock::Yes) \

View file

@ -69,7 +69,7 @@ ErrorOr<FlatPtr> Process::sys$open(Userspace<Syscall::SC_open_params const*> use
ErrorOr<FlatPtr> Process::sys$close(int fd)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
VERIFY_NO_PROCESS_BIG_LOCK(this)
TRY(require_promise(Pledge::stdio));
auto description = TRY(open_file_description(fd));
auto result = description->close();