summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-17 19:35:13 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-17 19:35:13 +0100
commitaf6358e1e1e3f834d5df5269f37bd1a016da2b8e (patch)
tree256ad2b65d03d635e34abdd8cef91fda6af09e8d /Kernel/FileSystem
parent32aa37d5dcfedf90a14696a5a6eec76bc029cffa (diff)
downloadserenity-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.cpp5
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)