From 82760998a9786a95129a7ccb33335889b2c07439 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 3 Jan 2020 17:47:31 +0100 Subject: [PATCH] Ext2FS: Take the inode lock in Ext2FSInode::metadata() Remove an unnecessary InterruptDisabler to make this not assert. :^) --- Kernel/FileSystem/Ext2FileSystem.cpp | 2 +- Kernel/FileSystem/InodeFile.cpp | 1 - 2 files changed, 1 insertion(+), 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 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);