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-Tag: firefly_0821_release~176^2~5129^2~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1cecf579d161527f610ef0da852dd6122e434a49;p=firefly-linux-kernel-4.4.55.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;