summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-19 22:20:43 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-20 17:20:44 +0200
commitbec314611d19408047a14f14349af4abf2578730 (patch)
treef0c9dcba215121b297567958d419de28cedf0947
parent11eee67b8510767d76fb4793e3b62ac1793dd723 (diff)
downloadserenity-bec314611d19408047a14f14349af4abf2578730.zip
Kernel: Move InodeMetadata methods out of line
-rw-r--r--Kernel/CMakeLists.txt1
-rw-r--r--Kernel/FileSystem/InodeMetadata.cpp27
-rw-r--r--Kernel/Process.h15
3 files changed, 28 insertions, 15 deletions
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 475e0992d5..7157fa197b 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -126,6 +126,7 @@ set(KERNEL_SOURCES
FileSystem/FileSystem.cpp
FileSystem/Inode.cpp
FileSystem/InodeFile.cpp
+ FileSystem/InodeMetadata.cpp
FileSystem/InodeWatcher.cpp
FileSystem/ISO9660FileSystem.cpp
FileSystem/Mount.cpp
diff --git a/Kernel/FileSystem/InodeMetadata.cpp b/Kernel/FileSystem/InodeMetadata.cpp
new file mode 100644
index 0000000000..ec112ac6b6
--- /dev/null
+++ b/Kernel/FileSystem/InodeMetadata.cpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <Kernel/FileSystem/InodeMetadata.h>
+#include <Kernel/Process.h>
+
+namespace Kernel {
+
+bool InodeMetadata::may_read(Process const& process) const
+{
+ return may_read(process.euid(), process.egid(), process.extra_gids());
+}
+
+bool InodeMetadata::may_write(Process const& process) const
+{
+ return may_write(process.euid(), process.egid(), process.extra_gids());
+}
+
+bool InodeMetadata::may_execute(Process const& process) const
+{
+ return may_execute(process.euid(), process.egid(), process.extra_gids());
+}
+
+}
diff --git a/Kernel/Process.h b/Kernel/Process.h
index 7c821cd155..d81fa3a335 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -1014,21 +1014,6 @@ inline void Process::for_each_in_pgrp(ProcessGroupID pgid, Callback callback)
});
}
-inline bool InodeMetadata::may_read(Process const& process) const
-{
- return may_read(process.euid(), process.egid(), process.extra_gids());
-}
-
-inline bool InodeMetadata::may_write(Process const& process) const
-{
- return may_write(process.euid(), process.egid(), process.extra_gids());
-}
-
-inline bool InodeMetadata::may_execute(Process const& process) const
-{
- return may_execute(process.euid(), process.egid(), process.extra_gids());
-}
-
inline ProcessID Thread::pid() const
{
return m_process->pid();