mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:07:40 +00:00
Kernel: Remove big lock from sys$unlink
This syscall doesn't access any unprotected shared data.
This commit is contained in:
parent
5a96260e25
commit
fa360f7d88
2 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ enum class NeedsBigProcessLock {
|
||||||
S(umask, NeedsBigProcessLock::Yes) \
|
S(umask, NeedsBigProcessLock::Yes) \
|
||||||
S(umount, NeedsBigProcessLock::Yes) \
|
S(umount, NeedsBigProcessLock::Yes) \
|
||||||
S(uname, NeedsBigProcessLock::No) \
|
S(uname, NeedsBigProcessLock::No) \
|
||||||
S(unlink, NeedsBigProcessLock::Yes) \
|
S(unlink, NeedsBigProcessLock::No) \
|
||||||
S(unveil, NeedsBigProcessLock::Yes) \
|
S(unveil, NeedsBigProcessLock::Yes) \
|
||||||
S(utime, NeedsBigProcessLock::Yes) \
|
S(utime, NeedsBigProcessLock::Yes) \
|
||||||
S(waitid, NeedsBigProcessLock::Yes) \
|
S(waitid, NeedsBigProcessLock::Yes) \
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Kernel {
|
||||||
|
|
||||||
ErrorOr<FlatPtr> Process::sys$unlink(Userspace<char const*> user_path, size_t path_length)
|
ErrorOr<FlatPtr> Process::sys$unlink(Userspace<char const*> user_path, size_t path_length)
|
||||||
{
|
{
|
||||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
VERIFY_NO_PROCESS_BIG_LOCK(this)
|
||||||
TRY(require_promise(Pledge::cpath));
|
TRY(require_promise(Pledge::cpath));
|
||||||
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
||||||
TRY(VirtualFileSystem::the().unlink(path->view(), current_directory()));
|
TRY(VirtualFileSystem::the().unlink(path->view(), current_directory()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue