diff options
author | creator1creeper1 <creator1creeper1@airmail.cc> | 2022-01-12 17:59:46 +0100 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-15 22:16:00 +0200 |
commit | ad480ff18bccb43d1cd29c86f1bb99c4888dfd8d (patch) | |
tree | 9edb9bc779c85f9268d47de5a74ae12a5e787a9c /Kernel/Memory/PrivateInodeVMObject.cpp | |
parent | 3879e70447a9e3b0f6a8ae64ba1a575c2b5f5703 (diff) | |
download | serenity-ad480ff18bccb43d1cd29c86f1bb99c4888dfd8d.zip |
Kernel: Make InodeVMOBject construction OOM-aware
This commit moves the allocation of the resources required for
InodeVMObject from its constructors to the constructors of its child
classes.
We're making this change to give the child classes the chance to expose
the fallibility of the allocation.
Diffstat (limited to 'Kernel/Memory/PrivateInodeVMObject.cpp')
-rw-r--r-- | Kernel/Memory/PrivateInodeVMObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Memory/PrivateInodeVMObject.cpp b/Kernel/Memory/PrivateInodeVMObject.cpp index cd552bc34f..16573fc2dd 100644 --- a/Kernel/Memory/PrivateInodeVMObject.cpp +++ b/Kernel/Memory/PrivateInodeVMObject.cpp @@ -20,12 +20,12 @@ ErrorOr<NonnullRefPtr<VMObject>> PrivateInodeVMObject::try_clone() } PrivateInodeVMObject::PrivateInodeVMObject(Inode& inode, size_t size) - : InodeVMObject(inode, size) + : InodeVMObject(inode, VMObject::must_create_physical_pages_but_fixme_should_propagate_errors(size)) { } PrivateInodeVMObject::PrivateInodeVMObject(PrivateInodeVMObject const& other) - : InodeVMObject(other) + : InodeVMObject(other, other.must_clone_physical_pages_but_fixme_should_propagate_errors()) { } |