diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-07 18:06:17 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-07 18:09:32 +0200 |
commit | 6bdb81ad87708015be8252b5e431a20b498048ff (patch) | |
tree | ed0bbcbf862a4f637f999f8cec53edb032e670f6 /Kernel/Process.cpp | |
parent | cb2d572a14d24b4d61b4a55ae31f606858b59162 (diff) | |
download | serenity-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.cpp | 4 |
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); |