diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-11 15:38:47 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-11 15:40:04 +0200 |
commit | 5254a320d8518f6b7c308648385a0b92680b16b1 (patch) | |
tree | 4dab2f1cffe21206da1531f8da5f56da412a61db /Kernel/FileSystem/Ext2FileSystem.cpp | |
parent | 560d037c41d97b4956b6e5551c758c01bbe71da2 (diff) | |
download | serenity-5254a320d8518f6b7c308648385a0b92680b16b1.zip |
Kernel: Remove use of copy_ref() in favor of regular RefPtr copies.
This is obviously more readable. If we ever run into a situation where
ref count churn is actually causing trouble in the future, we can deal with
it then. For now, let's keep it simple. :^)
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.cpp')
-rw-r--r-- | Kernel/FileSystem/Ext2FileSystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp index e357baad5b..c16e43c575 100644 --- a/Kernel/FileSystem/Ext2FileSystem.cpp +++ b/Kernel/FileSystem/Ext2FileSystem.cpp @@ -31,7 +31,7 @@ static u8 to_ext2_file_type(mode_t mode) return EXT2_FT_UNKNOWN; } -NonnullRefPtr<Ext2FS> Ext2FS::create(NonnullRefPtr<DiskDevice>&& device) +NonnullRefPtr<Ext2FS> Ext2FS::create(NonnullRefPtr<DiskDevice> device) { return adopt(*new Ext2FS(move(device))); } @@ -475,7 +475,7 @@ RefPtr<Inode> Ext2FS::get_inode(InodeIdentifier inode) const return (*it).value; auto new_inode = adopt(*new Ext2FSInode(const_cast<Ext2FS&>(*this), inode.index())); memcpy(&new_inode->m_raw_inode, reinterpret_cast<ext2_inode*>(block.offset_pointer(offset)), sizeof(ext2_inode)); - m_inode_cache.set(inode.index(), new_inode.copy_ref()); + m_inode_cache.set(inode.index(), new_inode); return new_inode; } |