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
commit f38d32535c
Notes: sideshowbarker 2024-07-17 22:39:37 +09:00
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)