1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

Ext2FS: Take the inode lock in Ext2FSInode::metadata()

Remove an unnecessary InterruptDisabler to make this not assert. :^)
This commit is contained in:
Andreas Kling 2020-01-03 17:47:31 +01:00
parent aba7829724
commit 82760998a9
2 changed files with 1 additions and 2 deletions

View file

@ -531,7 +531,7 @@ Ext2FSInode::~Ext2FSInode()
InodeMetadata Ext2FSInode::metadata() const InodeMetadata Ext2FSInode::metadata() const
{ {
// FIXME: This should probably take the inode lock, no? LOCKER(m_lock);
InodeMetadata metadata; InodeMetadata metadata;
metadata.inode = identifier(); metadata.inode = identifier();
metadata.size = m_raw_inode.i_size; metadata.size = m_raw_inode.i_size;

View file

@ -35,7 +35,6 @@ KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& descriptio
{ {
ASSERT(offset == 0); ASSERT(offset == 0);
// FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec. // 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); auto* region = process.allocate_file_backed_region(preferred_vaddr, size, inode(), description.absolute_path(), prot);
if (!region) if (!region)
return KResult(-ENOMEM); return KResult(-ENOMEM);