summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Mount.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-18 01:29:54 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-18 01:53:04 +0200
commit58c6d30f6a29420356b349888b2509b44cadc8c9 (patch)
tree7cc24c555f92bcf65b4914354cec15c0b0aac63b /Kernel/FileSystem/Mount.h
parent9457d83986a9c4dce4a0e75a1d005aa7dd60f5cf (diff)
downloadserenity-58c6d30f6a29420356b349888b2509b44cadc8c9.zip
Kernel/Ext2FS: Cache the root inode in a member variable
We often get queried for the root inode, and it will always be cached in memory anyway, so let's make Ext2FS::root_inode() fast by keeping the root inode in a dedicated member variable.
Diffstat (limited to 'Kernel/FileSystem/Mount.h')
-rw-r--r--Kernel/FileSystem/Mount.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/FileSystem/Mount.h b/Kernel/FileSystem/Mount.h
index e4a8782971..57790ad043 100644
--- a/Kernel/FileSystem/Mount.h
+++ b/Kernel/FileSystem/Mount.h
@@ -23,6 +23,7 @@ public:
Inode& guest() { return *m_guest; }
FileSystem const& guest_fs() const { return *m_guest_fs; }
+ FileSystem& guest_fs() { return *m_guest_fs; }
String absolute_path() const;