|
@@ -2675,14 +2675,12 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- mutex_lock(&fs_info->volume_mutex);
|
|
|
if (vol_args->flags & BTRFS_DEVICE_SPEC_BY_ID) {
|
|
|
ret = btrfs_rm_device(fs_info, NULL, vol_args->devid);
|
|
|
} else {
|
|
|
vol_args->name[BTRFS_SUBVOL_NAME_MAX] = '\0';
|
|
|
ret = btrfs_rm_device(fs_info, vol_args->name, 0);
|
|
|
}
|
|
|
- mutex_unlock(&fs_info->volume_mutex);
|
|
|
clear_bit(BTRFS_FS_EXCL_OP, &fs_info->flags);
|
|
|
|
|
|
if (!ret) {
|
|
@@ -2726,9 +2724,7 @@ static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg)
|
|
|
}
|
|
|
|
|
|
vol_args->name[BTRFS_PATH_NAME_MAX] = '\0';
|
|
|
- mutex_lock(&fs_info->volume_mutex);
|
|
|
ret = btrfs_rm_device(fs_info, vol_args->name, 0);
|
|
|
- mutex_unlock(&fs_info->volume_mutex);
|
|
|
|
|
|
if (!ret)
|
|
|
btrfs_info(fs_info, "disk deleted %s", vol_args->name);
|