rem: KDiskDevice *device = manager->RegisterDevice(partitionID); if (device) { device->ReadUnlock();
add: if (KDiskDevice *device = manager->RegisterDevice(partitionID)) { bool isLocked = device->IsReadLocked(false); if (isLocked) { device->ReadUnlock(); device->Unregister(); }
context: read_unlock_disk_device(partition_id partitionID){	KDiskDeviceManager *manager = KDiskDeviceManager::Default();	KDiskDevice *device = manager->RegisterDevice(partitionID);	if (device) {		device->ReadUnlock();		device->Unregister();	}}