diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp index ad252f1d24..7c5c93c728 100644 --- a/Kernel/FileSystem/InodeFile.cpp +++ b/Kernel/FileSystem/InodeFile.cpp @@ -83,6 +83,11 @@ ErrorOr InodeFile::ioctl(OpenFileDescription& description, unsigned reques ErrorOr InodeFile::mmap(Process& process, OpenFileDescription& description, Memory::VirtualRange const& range, u64 offset, int prot, bool shared) { + // FIXME: Support writing changes made to shared file mappings back to disk. + // Some ports behave incorrectly if we silently discard writes to memory-mapped files, so let's not lie about what we can do. + if (shared && (prot & PROT_WRITE)) + return ENOTSUP; + // FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec. RefPtr vmobject; if (shared)