mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
Kernel: Remove SmapDisabler in watch_file()
This commit is contained in:
parent
80cbb72f2f
commit
152a83fac5
1 changed files with 4 additions and 4 deletions
|
@ -3435,17 +3435,17 @@ int Process::sys$ftruncate(int fd, off_t length)
|
|||
return description->truncate(length);
|
||||
}
|
||||
|
||||
int Process::sys$watch_file(const char* path, int path_length)
|
||||
int Process::sys$watch_file(const char* user_path, int path_length)
|
||||
{
|
||||
if (path_length < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (!validate_read(path, path_length))
|
||||
if (!validate_read(user_path, path_length))
|
||||
return -EFAULT;
|
||||
|
||||
SmapDisabler disabler;
|
||||
auto path = copy_string_from_user(user_path, path_length);
|
||||
|
||||
auto custody_or_error = VFS::the().resolve_path({ path, (size_t)path_length }, current_directory());
|
||||
auto custody_or_error = VFS::the().resolve_path(path, current_directory());
|
||||
if (custody_or_error.is_error())
|
||||
return custody_or_error.error();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue