summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-03 17:47:31 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-03 17:48:02 +0100
commit82760998a9786a95129a7ccb33335889b2c07439 (patch)
tree842d170b4eb0de7d828560e20070ffaf68d18309
parentaba782972440cea5d95df9401fb27baef4bbfdec (diff)
downloadserenity-82760998a9786a95129a7ccb33335889b2c07439.zip
Ext2FS: Take the inode lock in Ext2FSInode::metadata()
Remove an unnecessary InterruptDisabler to make this not assert. :^)
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/InodeFile.cpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index a174f0fa78..66d23fe7cf 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -531,7 +531,7 @@ Ext2FSInode::~Ext2FSInode()
InodeMetadata Ext2FSInode::metadata() const
{
- // FIXME: This should probably take the inode lock, no?
+ LOCKER(m_lock);
InodeMetadata metadata;
metadata.inode = identifier();
metadata.size = m_raw_inode.i_size;
diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp
index d47f42ba2a..ea7a2347b6 100644
--- a/Kernel/FileSystem/InodeFile.cpp
+++ b/Kernel/FileSystem/InodeFile.cpp
@@ -35,7 +35,6 @@ KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& descriptio
{
ASSERT(offset == 0);
// FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec.
- InterruptDisabler disabler;
auto* region = process.allocate_file_backed_region(preferred_vaddr, size, inode(), description.absolute_path(), prot);
if (!region)
return KResult(-ENOMEM);