Browse Source

Kernel: Support file-backed mmap() with non-zero offset

As it turns out, this works just fine and all we had to do was remove
the assertion! :^)

Fixes #2597.
Andreas Kling 5 years ago
parent
commit
23082e528f
1 changed files with 0 additions and 1 deletions
  1. 0 1
      Kernel/FileSystem/InodeFile.cpp

+ 0 - 1
Kernel/FileSystem/InodeFile.cpp

@@ -64,7 +64,6 @@ ssize_t InodeFile::write(FileDescription& description, size_t offset, const u8*
 
 KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& description, VirtualAddress preferred_vaddr, size_t offset, size_t size, int prot, bool shared)
 {
-    ASSERT(offset == 0);
     // FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec.
     RefPtr<InodeVMObject> vmobject;
     if (shared)