From 1a2f71581b0687223c47083ab57974ee80498894 Mon Sep 17 00:00:00 2001 From: creator1creeper1 Date: Wed, 12 Jan 2022 20:57:07 +0100 Subject: [PATCH] Kernel: Remove infallible VMObject resource factory functions These infallible resource factory functions were only there to ease the conversion to the new factory functions. Since all child classes of VMObject now use the fallible resource factory functions, we don't need the infallible versions anymore. --- Kernel/Memory/VMObject.cpp | 10 ---------- Kernel/Memory/VMObject.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/Kernel/Memory/VMObject.cpp b/Kernel/Memory/VMObject.cpp index a10897fddb..d6d09c888b 100644 --- a/Kernel/Memory/VMObject.cpp +++ b/Kernel/Memory/VMObject.cpp @@ -22,21 +22,11 @@ ErrorOr>> VMObject::try_clone_physical_pages() c return m_physical_pages.try_clone(); } -FixedArray> VMObject::must_clone_physical_pages_but_fixme_should_propagate_errors() const -{ - return MUST(try_clone_physical_pages()); -} - ErrorOr>> VMObject::try_create_physical_pages(size_t size) { return FixedArray>::try_create(ceil_div(size, static_cast(PAGE_SIZE))); } -FixedArray> VMObject::must_create_physical_pages_but_fixme_should_propagate_errors(size_t size) -{ - return MUST(try_create_physical_pages(size)); -} - VMObject::VMObject(FixedArray>&& new_physical_pages) : m_physical_pages(move(new_physical_pages)) { diff --git a/Kernel/Memory/VMObject.h b/Kernel/Memory/VMObject.h index e2c775fd68..24898722a8 100644 --- a/Kernel/Memory/VMObject.h +++ b/Kernel/Memory/VMObject.h @@ -55,9 +55,7 @@ public: protected: static ErrorOr>> try_create_physical_pages(size_t); - static FixedArray> must_create_physical_pages_but_fixme_should_propagate_errors(size_t); ErrorOr>> try_clone_physical_pages() const; - FixedArray> must_clone_physical_pages_but_fixme_should_propagate_errors() const; explicit VMObject(FixedArray>&&); template