summaryrefslogtreecommitdiff
path: root/Kernel/Memory/PrivateInodeVMObject.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-06 12:58:03 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-06 13:06:05 +0200
commit6e3381ac32e5d251c124cc6147c4598dd2bac505 (patch)
tree108e6a04d89d5f9c483df0361079caea2424362c /Kernel/Memory/PrivateInodeVMObject.cpp
parente3a716ceffc0fc1f5c4f2ee35dee02e987731621 (diff)
downloadserenity-6e3381ac32e5d251c124cc6147c4598dd2bac505.zip
Kernel: Use KResultOr and TRY() for {Shared,Private}InodeVMObject
Diffstat (limited to 'Kernel/Memory/PrivateInodeVMObject.cpp')
-rw-r--r--Kernel/Memory/PrivateInodeVMObject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Memory/PrivateInodeVMObject.cpp b/Kernel/Memory/PrivateInodeVMObject.cpp
index 0c3aa9f981..25b1b6cbad 100644
--- a/Kernel/Memory/PrivateInodeVMObject.cpp
+++ b/Kernel/Memory/PrivateInodeVMObject.cpp
@@ -9,9 +9,9 @@
namespace Kernel::Memory {
-RefPtr<PrivateInodeVMObject> PrivateInodeVMObject::try_create_with_inode(Inode& inode)
+KResultOr<NonnullRefPtr<PrivateInodeVMObject>> PrivateInodeVMObject::try_create_with_inode(Inode& inode)
{
- return adopt_ref_if_nonnull(new (nothrow) PrivateInodeVMObject(inode, inode.size()));
+ return adopt_nonnull_ref_or_enomem(new (nothrow) PrivateInodeVMObject(inode, inode.size()));
}
KResultOr<NonnullRefPtr<VMObject>> PrivateInodeVMObject::try_clone()