Kernel/Storage: Safely increment the Device atomic minor number

This commit is contained in:
Liav A 2022-08-11 21:19:19 +03:00 committed by Linus Groh
parent d4bfb479fd
commit 0d6315dcc8
Notes: sideshowbarker 2024-07-17 09:49:33 +09:00

View File

@ -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()