partitioning: pass along reference to parent when uninitializing.
* Fixes problems with setting the partition name after uninitializing a partition in DriveSetup. Previously, UninitializeJob() was followed by SetStringJob(), but the kernel was updating the change counter for the parent partition when uninitializing a partition, leading to SetStringJob() having an incorrect change counter for the parent partition. Now the parent change counter will be correct when SetStringJob() runs.
This commit is contained in:
@@ -523,7 +523,15 @@ DiskDeviceJobGenerator::_GenerateUninitializeJob(BPartition* partition)
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
return _AddJob(new(nothrow) UninitializeJob(reference));
|
||||
BPartition* parent = partition->Parent();
|
||||
PartitionReference* parentReference = NULL;
|
||||
if (parent != NULL) {
|
||||
error = _GetPartitionReference(parent, parentReference);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
}
|
||||
|
||||
return _AddJob(new(nothrow) UninitializeJob(reference, parentReference));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user