summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Ext2FileSystem.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-18 01:50:47 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-18 01:53:04 +0200
commit1f18558ee23bdfc8ab6d2978c50a8e9eab5c6646 (patch)
tree9ec4283b65509bc79a3a9d44d75423e7a888d3da /Kernel/FileSystem/Ext2FileSystem.cpp
parent58c6d30f6a29420356b349888b2509b44cadc8c9 (diff)
downloadserenity-1f18558ee23bdfc8ab6d2978c50a8e9eab5c6646.zip
Kernel: Make FileSystem::root_inode() return a plain Inode&
All file system classes are expected to keep their root Inode object in memory, so this function can safely return an Inode&.
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.cpp')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index b5e4d58813..c2b493b272 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -154,7 +154,7 @@ bool Ext2FS::initialize()
return true;
}
-NonnullRefPtr<Inode> Ext2FS::root_inode() const
+Ext2FSInode& Ext2FS::root_inode()
{
return *m_root_inode;
}