Merge tag 'v3.10.108' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / btrfs / ioctl.c
index 296cc1b4944682413dbf5b8fc30dd0b960ae9a0b..7831e6865f16a33d9813f11d371b0acb3a0f0539 100644 (file)
@@ -2974,6 +2974,10 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
                ret = PTR_ERR(new_root);
                goto out;
        }
+       if (!is_fstree(new_root->objectid)) {
+               ret = -ENOENT;
+               goto out;
+       }
 
        if (btrfs_root_refs(&new_root->root_item) == 0) {
                ret = -ENOENT;