1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:18:11 +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:
Andreas Kling 2023-03-07 12:25:00 +01:00
parent 067d0689c5
commit e6fc7b3ff7
50 changed files with 143 additions and 144 deletions

View file

@ -14,9 +14,9 @@ Plan9FSInode::Plan9FSInode(Plan9FS& fs, u32 fid)
{
}
ErrorOr<NonnullLockRefPtr<Plan9FSInode>> Plan9FSInode::try_create(Plan9FS& fs, u32 fid)
ErrorOr<NonnullRefPtr<Plan9FSInode>> Plan9FSInode::try_create(Plan9FS& fs, u32 fid)
{
return adopt_nonnull_lock_ref_or_enomem(new (nothrow) Plan9FSInode(fs, fid));
return adopt_nonnull_ref_or_enomem(new (nothrow) Plan9FSInode(fs, fid));
}
Plan9FSInode::~Plan9FSInode()
@ -245,7 +245,7 @@ ErrorOr<void> Plan9FSInode::traverse_as_directory(Function<ErrorOr<void>(FileSys
return ENOTIMPL;
}
ErrorOr<NonnullLockRefPtr<Inode>> Plan9FSInode::lookup(StringView name)
ErrorOr<NonnullRefPtr<Inode>> Plan9FSInode::lookup(StringView name)
{
u32 newfid = fs().allocate_fid();
Plan9FSMessage message { fs(), Plan9FSMessage::Type::Twalk };
@ -254,7 +254,7 @@ ErrorOr<NonnullLockRefPtr<Inode>> Plan9FSInode::lookup(StringView name)
return TRY(Plan9FSInode::try_create(fs(), newfid));
}
ErrorOr<NonnullLockRefPtr<Inode>> Plan9FSInode::create_child(StringView, mode_t, dev_t, UserID, GroupID)
ErrorOr<NonnullRefPtr<Inode>> Plan9FSInode::create_child(StringView, mode_t, dev_t, UserID, GroupID)
{
// TODO
return ENOTIMPL;