diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 3ad5c10d3704bc4f621398b2c5f726ee9746471a..10c18a6582cc7e30706aa3765dfde70fe42e7dee 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1858,7 +1858,9 @@ static noinline int may_destroy_subvol(struct btrfs_root *root) if (di && !IS_ERR(di)) { btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key); 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; } btrfs_release_path(path);