mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
Kernel/Storage: Safely increment the Device atomic minor number
This commit is contained in:
parent
d4bfb479fd
commit
0d6315dcc8
Notes:
sideshowbarker
2024-07-17 09:49:33 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/0d6315dcc8 Pull-request: https://github.com/SerenityOS/serenity/pull/14779 Reviewed-by: https://github.com/kleinesfilmroellchen
@ -241,9 +241,7 @@ MajorNumber StorageManagement::storage_type_major_number()
|
||||
}
|
||||
MinorNumber StorageManagement::generate_storage_minor_number()
|
||||
{
|
||||
auto minor_number = s_device_minor_number.load();
|
||||
s_device_minor_number++;
|
||||
return minor_number;
|
||||
return s_device_minor_number.fetch_add(1);
|
||||
}
|
||||
|
||||
u32 StorageManagement::generate_controller_id()
|
||||
|
Loading…
Reference in New Issue
Block a user