diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-24 15:56:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-24 18:35:41 +0200 |
commit | 2c72d495a300bb24dc8b9cf5dd61f09dac7a7736 (patch) | |
tree | d5c66aaea8e296eea285b17119911ee2b78e11ff /Kernel/Memory/SharedInodeVMObject.h | |
parent | 5a804b9a1df6138ddc5c34f1f71764ef23618206 (diff) | |
download | serenity-2c72d495a300bb24dc8b9cf5dd61f09dac7a7736.zip |
Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage
I believe this to be safe, as the main thing that LockRefPtr provides
over RefPtr is safe copying from a shared LockRefPtr instance. I've
inspected the uses of RefPtr<PhysicalPage> and it seems they're all
guarded by external locking. Some of it is less obvious, but this is
an area where we're making continuous headway.
Diffstat (limited to 'Kernel/Memory/SharedInodeVMObject.h')
-rw-r--r-- | Kernel/Memory/SharedInodeVMObject.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Memory/SharedInodeVMObject.h b/Kernel/Memory/SharedInodeVMObject.h index 6f3c554a1d..8a9ee21c46 100644 --- a/Kernel/Memory/SharedInodeVMObject.h +++ b/Kernel/Memory/SharedInodeVMObject.h @@ -23,8 +23,8 @@ public: private: virtual bool is_shared_inode() const override { return true; } - explicit SharedInodeVMObject(Inode&, FixedArray<LockRefPtr<PhysicalPage>>&&, Bitmap dirty_pages); - explicit SharedInodeVMObject(SharedInodeVMObject const&, FixedArray<LockRefPtr<PhysicalPage>>&&, Bitmap dirty_pages); + explicit SharedInodeVMObject(Inode&, FixedArray<RefPtr<PhysicalPage>>&&, Bitmap dirty_pages); + explicit SharedInodeVMObject(SharedInodeVMObject const&, FixedArray<RefPtr<PhysicalPage>>&&, Bitmap dirty_pages); virtual StringView class_name() const override { return "SharedInodeVMObject"sv; } |