Kernel: Don't lock SysFS filesystem mutex calling traverse_as_directory

This locking is simply not needed because the associated SysFS component
will use proper and more "atomic" locking on its own.
This commit is contained in:
Liav A 2023-05-26 13:13:18 +03:00 committed by Andreas Kling
parent a467f78aa7
commit bce17d06f5
Notes: sideshowbarker 2024-07-17 01:06:10 +09:00

View file

@ -38,13 +38,11 @@ InodeMetadata SysFSDirectoryInode::metadata() const
ErrorOr<void> SysFSDirectoryInode::traverse_as_directory(Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)> callback) const
{
MutexLocker locker(fs().m_lock);
return m_associated_component->traverse_as_directory(fs().fsid(), move(callback));
}
ErrorOr<NonnullRefPtr<Inode>> SysFSDirectoryInode::lookup(StringView name)
{
MutexLocker locker(fs().m_lock);
auto component = m_associated_component->lookup(name);
if (!component)
return ENOENT;