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:
@@ -109,13 +109,16 @@ class AutoLockerPartitionRegistration {
|
||||
public:
|
||||
inline bool Lock(KPartition *partition)
|
||||
{
|
||||
if (partition == NULL)
|
||||
return true;
|
||||
partition->Register();
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void Unlock(KPartition *partition)
|
||||
{
|
||||
partition->Unregister();
|
||||
if (partition != NULL)
|
||||
partition->Unregister();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -77,7 +77,8 @@ status_t _user_initialize_partition(partition_id partitionID,
|
||||
int32* changeCounter, const char* diskSystemName,
|
||||
const char* name, const char* parameters);
|
||||
status_t _user_uninitialize_partition(partition_id partitionID,
|
||||
int32* changeCounter);
|
||||
int32* changeCounter, partition_id parentID,
|
||||
int32* parentChangeCounter);
|
||||
|
||||
status_t _user_create_child_partition(partition_id partitionID,
|
||||
int32* changeCounter, off_t offset, off_t size,
|
||||
|
||||
Reference in New Issue
Block a user