diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-17 19:35:13 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-17 19:35:13 +0100 |
commit | af6358e1e1e3f834d5df5269f37bd1a016da2b8e (patch) | |
tree | 256ad2b65d03d635e34abdd8cef91fda6af09e8d /Kernel/FileSystem | |
parent | 32aa37d5dcfedf90a14696a5a6eec76bc029cffa (diff) | |
download | serenity-af6358e1e1e3f834d5df5269f37bd1a016da2b8e.zip |
Kernel: Allow mmap() with PROT_WRITE+MAP_SHARED
Now that we have a way to flush changes back to disk, let's allow this
type of mapping.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/InodeFile.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp index 7c5c93c728..ad252f1d24 100644 --- a/Kernel/FileSystem/InodeFile.cpp +++ b/Kernel/FileSystem/InodeFile.cpp @@ -83,11 +83,6 @@ ErrorOr<void> InodeFile::ioctl(OpenFileDescription& description, unsigned reques ErrorOr<Memory::Region*> 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<Memory::InodeVMObject> vmobject; if (shared) |