mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Make Ext2FSInode::traverse_as_directory to take m_inode_lock
The contents of the directory inode could change if we are not taking so we must take the m_inode_lock to prevent corruption when reading the directory contents.
This commit is contained in:
parent
46ef2f8e20
commit
2ab657d3b5
1 changed files with 1 additions and 0 deletions
|
@ -728,6 +728,7 @@ ErrorOr<size_t> Ext2FSInode::write_bytes_locked(off_t offset, size_t count, User
|
|||
|
||||
ErrorOr<void> Ext2FSInode::traverse_as_directory(Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
|
||||
{
|
||||
MutexLocker locker(m_inode_lock);
|
||||
VERIFY(is_directory());
|
||||
|
||||
u8 buffer[max_block_size];
|
||||
|
|
Loading…
Add table
Reference in a new issue