1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

Kernel: Access OpenFileDescriptions::max_open() statically in Syscalls

This commit is contained in:
Hendiadyoin1 2021-12-18 18:39:18 +01:00 committed by Brian Gianforcaro
parent c860e0ab95
commit f38d32535c
4 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@ ErrorOr<FlatPtr> Process::sys$pipe(int pipefd[2], int flags)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
REQUIRE_PROMISE(stdio);
if (fds().open_count() + 2 > fds().max_open())
if (fds().open_count() + 2 > OpenFileDescriptions::max_open())
return EMFILE;
// Reject flags other than O_CLOEXEC, O_NONBLOCK
if ((flags & (O_CLOEXEC | O_NONBLOCK)) != flags)