From: chandan Date: Fri, 13 Sep 2013 14:04:10 +0000 (+0530) Subject: Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cecf579d161527f610ef0da852dd6122e434a49;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0 This patch makes it possible to set BTRFS_FS_TREE_OBJECTID as the default subvolume by passing a subvolume id of 0. Signed-off-by: chandan Reviewed-by: David Sterba Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index fd6557e7118a..fba259ab9994 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3310,7 +3310,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) } if (!objectid) - objectid = root->root_key.objectid; + objectid = BTRFS_FS_TREE_OBJECTID; location.objectid = objectid; location.type = BTRFS_ROOT_ITEM_KEY;