|
@@ -569,6 +569,8 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
|
|
|
btrfs_kobj_rm_device(fs_info, src_device);
|
|
|
btrfs_kobj_add_device(fs_info, tgt_device);
|
|
|
|
|
|
+ btrfs_dev_replace_unlock(dev_replace);
|
|
|
+
|
|
|
btrfs_rm_dev_replace_blocked(fs_info);
|
|
|
|
|
|
btrfs_rm_dev_replace_srcdev(fs_info, src_device);
|
|
@@ -582,7 +584,6 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
|
|
|
* superblock is scratched out so that it is no longer marked to
|
|
|
* belong to this filesystem.
|
|
|
*/
|
|
|
- btrfs_dev_replace_unlock(dev_replace);
|
|
|
mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);
|
|
|
mutex_unlock(&root->fs_info->chunk_mutex);
|
|
|
|