1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

Kernel: Stop using *LockRefPtr for FileSystem pointers

There was only one permanent storage location for these: as a member
in the Mount class.

That member is never modified after Mount initialization, so we don't
need to worry about races there.
This commit is contained in:
Andreas Kling 2023-04-02 17:25:09 +02:00
parent 3f69ef86c2
commit 673592dea8
23 changed files with 40 additions and 41 deletions

View file

@ -11,9 +11,9 @@
namespace Kernel {
ErrorOr<NonnullLockRefPtr<FileSystem>> SysFS::try_create()
ErrorOr<NonnullRefPtr<FileSystem>> SysFS::try_create()
{
return TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) SysFS));
return TRY(adopt_nonnull_ref_or_enomem(new (nothrow) SysFS));
}
SysFS::SysFS() = default;

View file

@ -20,7 +20,7 @@ class SysFS final : public FileSystem {
public:
virtual ~SysFS() override;
static ErrorOr<NonnullLockRefPtr<FileSystem>> try_create();
static ErrorOr<NonnullRefPtr<FileSystem>> try_create();
virtual ErrorOr<void> initialize() override;
virtual StringView class_name() const override { return "SysFS"sv; }