summaryrefslogtreecommitdiff
path: root/Kernel/VM/Region.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-11 15:38:47 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-11 15:40:04 +0200
commit5254a320d8518f6b7c308648385a0b92680b16b1 (patch)
tree4dab2f1cffe21206da1531f8da5f56da412a61db /Kernel/VM/Region.cpp
parent560d037c41d97b4956b6e5551c758c01bbe71da2 (diff)
downloadserenity-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/VM/Region.cpp')
-rw-r--r--Kernel/VM/Region.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/VM/Region.cpp b/Kernel/VM/Region.cpp
index b18aa639cd..d0c8426239 100644
--- a/Kernel/VM/Region.cpp
+++ b/Kernel/VM/Region.cpp
@@ -25,7 +25,7 @@ Region::Region(const Range& range, RefPtr<Inode>&& inode, const String& name, u8
MM.register_region(*this);
}
-Region::Region(const Range& range, NonnullRefPtr<VMObject>&& vmo, size_t offset_in_vmo, const String& name, u8 access, bool cow)
+Region::Region(const Range& range, NonnullRefPtr<VMObject> vmo, size_t offset_in_vmo, const String& name, u8 access, bool cow)
: m_range(range)
, m_offset_in_vmo(offset_in_vmo)
, m_vmo(move(vmo))
@@ -78,7 +78,7 @@ NonnullRefPtr<Region> Region::clone()
vaddr().get());
#endif
// Create a new region backed by the same VMObject.
- return adopt(*new Region(m_range, m_vmo.copy_ref(), m_offset_in_vmo, String(m_name), m_access));
+ return adopt(*new Region(m_range, m_vmo, m_offset_in_vmo, String(m_name), m_access));
}
#ifdef MM_DEBUG