Kernel: Remove an unnecessary cast in sys$execve()

This commit is contained in:
Andreas Kling 2020-12-25 14:16:35 +01:00
parent 9c640e67ac
commit 791b32e3c6
Notes: sideshowbarker 2024-07-19 00:36:54 +09:00

View file

@ -63,7 +63,7 @@ KResultOr<Process::LoadResult> Process::load_elf_object(FileDescription& object_
{
auto& inode = *(object_description.inode());
auto vmobject = SharedInodeVMObject::create_with_inode(inode);
if (static_cast<const SharedInodeVMObject&>(*vmobject).writable_mappings()) {
if (vmobject->writable_mappings()) {
dbgln("Refusing to execute a write-mapped program");
return KResult(-ETXTBSY);
}