summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 11:49:16 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 14:14:51 +0200
commit98080497d28540a48bec50a92b356a4edaddc235 (patch)
tree81592275823f8037eaa535f4b28ae3a0cc9aa214 /Kernel/FileSystem
parent47bfd366a8b015d5771c64e010d64d2105df7df2 (diff)
downloadserenity-98080497d28540a48bec50a92b356a4edaddc235.zip
Kernel: Use Forward.h headers more
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/DevFS.h7
-rw-r--r--Kernel/FileSystem/FileSystem.h6
-rw-r--r--Kernel/FileSystem/Forward.h20
-rw-r--r--Kernel/FileSystem/InodeWatcher.h3
-rw-r--r--Kernel/FileSystem/Mount.h2
-rw-r--r--Kernel/FileSystem/ProcFS.h7
-rw-r--r--Kernel/FileSystem/SysFSComponent.h2
-rw-r--r--Kernel/FileSystem/VirtualFileSystem.h5
8 files changed, 7 insertions, 45 deletions
diff --git a/Kernel/FileSystem/DevFS.h b/Kernel/FileSystem/DevFS.h
index 785aa75f96..b962998c6d 100644
--- a/Kernel/FileSystem/DevFS.h
+++ b/Kernel/FileSystem/DevFS.h
@@ -14,13 +14,6 @@
namespace Kernel {
-class DevFSInode;
-class DevFSDeviceInode;
-class DevFSDirectoryInode;
-class DevFSRootDirectoryInode;
-class DevFSDevicesDirectoryInode;
-class DevFSPtsDirectoryInode;
-class Device;
class DevFS final : public FileSystem {
friend class DevFSInode;
friend class DevFSRootDirectoryInode;
diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h
index 2e39a35236..d440e4cfe9 100644
--- a/Kernel/FileSystem/FileSystem.h
+++ b/Kernel/FileSystem/FileSystem.h
@@ -10,6 +10,7 @@
#include <AK/RefPtr.h>
#include <AK/StringView.h>
#include <Kernel/FileSystem/InodeIdentifier.h>
+#include <Kernel/Forward.h>
#include <Kernel/KResult.h>
#include <Kernel/Lock.h>
#include <Kernel/UnixTypes.h>
@@ -19,11 +20,6 @@ namespace Kernel {
static constexpr u32 mepoch = 476763780;
-class Inode;
-class FileDescription;
-class LocalSocket;
-class VMObject;
-
class FileSystem : public RefCounted<FileSystem> {
friend class Inode;
diff --git a/Kernel/FileSystem/Forward.h b/Kernel/FileSystem/Forward.h
deleted file mode 100644
index 859af7747e..0000000000
--- a/Kernel/FileSystem/Forward.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#pragma once
-
-namespace Kernel {
-
-class FileSystem;
-class Inode;
-class Mount;
-class SysFS;
-class SysFSDirectoryInode;
-class SysFSInode;
-class VirtualFileSystem;
-struct InodeMetadata;
-
-}
diff --git a/Kernel/FileSystem/InodeWatcher.h b/Kernel/FileSystem/InodeWatcher.h
index 01c0fa3528..3425554e95 100644
--- a/Kernel/FileSystem/InodeWatcher.h
+++ b/Kernel/FileSystem/InodeWatcher.h
@@ -14,11 +14,10 @@
#include <AK/NonnullOwnPtr.h>
#include <Kernel/API/InodeWatcherEvent.h>
#include <Kernel/FileSystem/File.h>
+#include <Kernel/Forward.h>
namespace Kernel {
-class Inode;
-
// A specific description of a watch.
struct WatchDescription {
int wd;
diff --git a/Kernel/FileSystem/Mount.h b/Kernel/FileSystem/Mount.h
index 44397744cc..e4a8782971 100644
--- a/Kernel/FileSystem/Mount.h
+++ b/Kernel/FileSystem/Mount.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/NonnullRefPtr.h>
-#include <Kernel/FileSystem/Forward.h>
+#include <Kernel/Forward.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/ProcFS.h b/Kernel/FileSystem/ProcFS.h
index d0cc2ffc41..fb9b4a7ead 100644
--- a/Kernel/FileSystem/ProcFS.h
+++ b/Kernel/FileSystem/ProcFS.h
@@ -10,17 +10,13 @@
#include <AK/Types.h>
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/Inode.h>
+#include <Kernel/Forward.h>
#include <Kernel/KBufferBuilder.h>
#include <Kernel/Lock.h>
#include <Kernel/ProcessExposed.h>
namespace Kernel {
-class Process;
-
-class ProcFSInode;
-class ProcFSDirectoryInode;
-
class ProcFS final : public FileSystem {
friend class ProcFSInode;
friend class ProcFSDirectoryInode;
@@ -99,4 +95,5 @@ protected:
ProcFS& m_parent_fs;
};
+
}
diff --git a/Kernel/FileSystem/SysFSComponent.h b/Kernel/FileSystem/SysFSComponent.h
index 7ed8d4d1bc..b645f86671 100644
--- a/Kernel/FileSystem/SysFSComponent.h
+++ b/Kernel/FileSystem/SysFSComponent.h
@@ -13,7 +13,7 @@
#include <AK/Types.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/FileSystem/FileSystem.h>
-#include <Kernel/FileSystem/Forward.h>
+#include <Kernel/Forward.h>
#include <Kernel/KResult.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h
index c0820cc9ea..7e99b51fca 100644
--- a/Kernel/FileSystem/VirtualFileSystem.h
+++ b/Kernel/FileSystem/VirtualFileSystem.h
@@ -17,15 +17,12 @@
#include <Kernel/FileSystem/InodeIdentifier.h>
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/FileSystem/Mount.h>
+#include <Kernel/Forward.h>
#include <Kernel/KResult.h>
#include <Kernel/UnveilNode.h>
namespace Kernel {
-class Custody;
-class Device;
-class FileDescription;
-
struct UidAndGid {
uid_t uid;
gid_t gid;