mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
Kernel/Storage: Use NonnullRefPtr for storage controllers
Storage controllers are initialized during init and are never modified. NonnullRefPtr can be safely used instead of the NonnullLockRefPtr. This also fixes one of the UB issue that was there when using an NVMe device because of NonnullLockRefPtr. We can add proper locking when we need to modify the storage controllers after init.
This commit is contained in:
parent
0dbca4af06
commit
b204da94b0
11 changed files with 16 additions and 16 deletions
|
@ -11,9 +11,9 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
NonnullLockRefPtr<RamdiskController> RamdiskController::initialize()
|
||||
NonnullRefPtr<RamdiskController> RamdiskController::initialize()
|
||||
{
|
||||
return adopt_lock_ref(*new RamdiskController());
|
||||
return adopt_ref(*new RamdiskController());
|
||||
}
|
||||
|
||||
bool RamdiskController::reset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue