diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-18 01:50:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-18 01:53:04 +0200 |
commit | 1f18558ee23bdfc8ab6d2978c50a8e9eab5c6646 (patch) | |
tree | 9ec4283b65509bc79a3a9d44d75423e7a888d3da /Kernel/FileSystem/Ext2FileSystem.h | |
parent | 58c6d30f6a29420356b349888b2509b44cadc8c9 (diff) | |
download | serenity-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.h')
-rw-r--r-- | Kernel/FileSystem/Ext2FileSystem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.h b/Kernel/FileSystem/Ext2FileSystem.h index c71eefca76..d3318ab2e4 100644 --- a/Kernel/FileSystem/Ext2FileSystem.h +++ b/Kernel/FileSystem/Ext2FileSystem.h @@ -128,7 +128,7 @@ private: bool flush_super_block(); virtual StringView class_name() const override { return "Ext2FS"sv; } - virtual NonnullRefPtr<Inode> root_inode() const override; + virtual Ext2FSInode& root_inode() override; RefPtr<Inode> get_inode(InodeIdentifier) const; KResultOr<NonnullRefPtr<Inode>> create_inode(Ext2FSInode& parent_inode, const String& name, mode_t, dev_t, uid_t, gid_t); KResult create_directory(Ext2FSInode& parent_inode, const String& name, mode_t, uid_t, gid_t); |