1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

Kernel: Mark inode watcher syscalls as not needing the big lock

These syscalls are already protected by existing locking mechanisms,
including the mutex inside InodeWatcher.
This commit is contained in:
Andreas Kling 2023-04-03 18:43:20 +02:00
parent 08d79c757a
commit bd46397e1f
2 changed files with 157 additions and 157 deletions

View file

@ -39,7 +39,7 @@ ErrorOr<FlatPtr> Process::sys$create_inode_watcher(u32 flags)
ErrorOr<FlatPtr> Process::sys$inode_watcher_add_watch(Userspace<Syscall::SC_inode_watcher_add_watch_params const*> user_params)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::rpath));
auto params = TRY(copy_typed_from_user(user_params));
@ -57,7 +57,7 @@ ErrorOr<FlatPtr> Process::sys$inode_watcher_add_watch(Userspace<Syscall::SC_inod
ErrorOr<FlatPtr> Process::sys$inode_watcher_remove_watch(int fd, int wd)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
auto description = TRY(open_file_description(fd));
if (!description->is_inode_watcher())
return EBADF;