mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
Kernel/Storage: Safely increment the Controller atomic ID counter
This commit is contained in:
parent
0d6315dcc8
commit
cb68619b7f
1 changed files with 1 additions and 3 deletions
|
@ -246,9 +246,7 @@ MinorNumber StorageManagement::generate_storage_minor_number()
|
|||
|
||||
u32 StorageManagement::generate_controller_id()
|
||||
{
|
||||
auto controller_id = s_controller_id.load();
|
||||
s_controller_id++;
|
||||
return controller_id;
|
||||
return s_controller_id.fetch_add(1);
|
||||
}
|
||||
|
||||
NonnullRefPtr<FileSystem> StorageManagement::root_filesystem() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue