summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2023-05-26 13:58:31 +0300
committerAndreas Kling <kling@serenityos.org>2023-05-27 10:58:58 +0200
commit0be79f9bc23ec739219cf4d3abeaf538364a534d (patch)
tree4d45d6063e7a5245b3ad3e57bb7823ecf88179ea /Kernel
parent902dac7f5fa7e116ba495a4a9dbd13f0bf3ec07f (diff)
downloadserenity-0be79f9bc23ec739219cf4d3abeaf538364a534d.zip
Kernel: Mark sys$umount as not needing the big lock
All accesses to the mount table are already serialized by the actual spinlock of that table.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/API/Syscall.h2
-rw-r--r--Kernel/Syscalls/mount.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index ccf039da33..afa6fc57f0 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -193,7 +193,7 @@ enum class NeedsBigProcessLock {
S(sysconf, NeedsBigProcessLock::No) \
S(times, NeedsBigProcessLock::No) \
S(umask, NeedsBigProcessLock::No) \
- S(umount, NeedsBigProcessLock::Yes) \
+ S(umount, NeedsBigProcessLock::No) \
S(uname, NeedsBigProcessLock::No) \
S(unlink, NeedsBigProcessLock::No) \
S(unveil, NeedsBigProcessLock::No) \
diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp
index c8387b4d84..e945515141 100644
--- a/Kernel/Syscalls/mount.cpp
+++ b/Kernel/Syscalls/mount.cpp
@@ -161,7 +161,7 @@ ErrorOr<FlatPtr> Process::sys$bindmount(Userspace<Syscall::SC_bindmount_params c
ErrorOr<FlatPtr> Process::sys$umount(Userspace<char const*> user_mountpoint, size_t mountpoint_length)
{
- VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
+ VERIFY_NO_PROCESS_BIG_LOCK(this);
auto credentials = this->credentials();
if (!credentials->is_superuser())
return EPERM;