Kernel/DevFS: Remove redundant DevFS& member from DevFSInode

All Inode subclasses can get to their FileSystem via Inode::fs().
This commit is contained in:
Andreas Kling 2021-07-18 02:21:34 +02:00
parent bd37840cf5
commit d3cf4cd8f0
Notes: sideshowbarker 2024-07-18 08:50:38 +09:00
2 changed files with 13 additions and 11 deletions

View file

@ -48,6 +48,9 @@ class DevFSInode : public Inode {
public:
virtual StringView name() const = 0;
DevFS& fs() { return static_cast<DevFS&>(Inode::fs()); }
DevFS const& fs() const { return static_cast<DevFS const&>(Inode::fs()); }
protected:
DevFSInode(DevFS&);
virtual KResultOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer& buffer, FileDescription*) const override;
@ -153,7 +156,6 @@ private:
NonnullRefPtrVector<DevFSDirectoryInode> m_subdirectories;
NonnullRefPtrVector<DevFSLinkInode> m_links;
DevFS& m_parent_fs;
};
}