|
@@ -1858,7 +1858,9 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
|
|
if (di && !IS_ERR(di)) {
|
|
if (di && !IS_ERR(di)) {
|
|
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
|
|
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
|
|
if (key.objectid == root->root_key.objectid) {
|
|
if (key.objectid == root->root_key.objectid) {
|
|
- ret = -ENOTEMPTY;
|
|
|
|
|
|
+ ret = -EPERM;
|
|
|
|
+ btrfs_err(root->fs_info, "deleting default subvolume "
|
|
|
|
+ "%llu is not allowed", key.objectid);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
btrfs_release_path(path);
|
|
btrfs_release_path(path);
|