Parcourir la source

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.
Liav A il y a 2 ans
Parent
commit
bce17d06f5
1 fichiers modifiés avec 0 ajouts et 2 suppressions
  1. 0 2
      Kernel/FileSystem/SysFS/DirectoryInode.cpp

+ 0 - 2
Kernel/FileSystem/SysFS/DirectoryInode.cpp

@@ -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;