mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
Kernel: Switch LockRefPtr<Inode> to RefPtr<Inode>
The main place where this is a little iffy is in RAMFS where inodes have a LockWeakPtr to their parent inode. I've left that as a LockWeakPtr for now.
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<SysFSDirectoryInode>> SysFSDirectoryInode::try_create(SysFS const& sysfs, SysFSComponent const& component)
|
||||
ErrorOr<NonnullRefPtr<SysFSDirectoryInode>> SysFSDirectoryInode::try_create(SysFS const& sysfs, SysFSComponent const& component)
|
||||
{
|
||||
return adopt_nonnull_lock_ref_or_enomem(new (nothrow) SysFSDirectoryInode(sysfs, component));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) SysFSDirectoryInode(sysfs, component));
|
||||
}
|
||||
|
||||
SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SysFSComponent const& component)
|
||||
@@ -42,7 +42,7 @@ ErrorOr<void> SysFSDirectoryInode::traverse_as_directory(Function<ErrorOr<void>(
|
||||
return m_associated_component->traverse_as_directory(fs().fsid(), move(callback));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<Inode>> SysFSDirectoryInode::lookup(StringView name)
|
||||
ErrorOr<NonnullRefPtr<Inode>> SysFSDirectoryInode::lookup(StringView name)
|
||||
{
|
||||
MutexLocker locker(fs().m_lock);
|
||||
auto component = m_associated_component->lookup(name);
|
||||
|
||||
Reference in New Issue
Block a user