|
@@ -2245,13 +2245,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running,
|
|
|
|
- 1)) {
|
|
|
|
- pr_info("btrfs: dev add/delete/balance/replace/resize operation in progress\n");
|
|
|
|
- mnt_drop_write_file(file);
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (btrfs_root_readonly(root)) {
|
|
if (btrfs_root_readonly(root)) {
|
|
ret = -EROFS;
|
|
ret = -EROFS;
|
|
goto out;
|
|
goto out;
|
|
@@ -2306,7 +2299,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
}
|
|
}
|
|
out:
|
|
out:
|
|
- atomic_set(&root->fs_info->mutually_exclusive_operation_running, 0);
|
|
|
|
mnt_drop_write_file(file);
|
|
mnt_drop_write_file(file);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|