summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-07 18:06:17 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-07 18:09:32 +0200
commit6bdb81ad87708015be8252b5e431a20b498048ff (patch)
treeed0bbcbf862a4f637f999f8cec53edb032e670f6 /Kernel/Process.cpp
parentcb2d572a14d24b4d61b4a55ae31f606858b59162 (diff)
downloadserenity-6bdb81ad87708015be8252b5e431a20b498048ff.zip
Kernel: Split VMObject into two classes: Anonymous- and InodeVMObject
InodeVMObject is a VMObject with an underlying Inode in the filesystem. AnonymousVMObject has no Inode. I'm happy that InodeVMObject::inode() can now return Inode& instead of VMObject::inode() return Inode*. :^)
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 11cd0977d1..c12ee32541 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -26,6 +26,7 @@
#include <Kernel/StdLib.h>
#include <Kernel/Syscall.h>
#include <Kernel/TTY/MasterPTY.h>
+#include <Kernel/VM/InodeVMObject.h>
#include <Kernel/kmalloc.h>
#include <LibC/errno_numbers.h>
#include <LibC/signal_numbers.h>
@@ -339,7 +340,8 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
#endif
ProcessPagingScope paging_scope(*this);
- auto vmo = VMObject::create_file_backed(description->inode());
+ ASSERT(description->inode());
+ auto vmo = InodeVMObject::create_with_inode(*description->inode());
RefPtr<Region> region = allocate_region_with_vmo(VirtualAddress(), metadata.size, vmo, 0, description->absolute_path(), PROT_READ);
ASSERT(region);