Commit 1cecf579 authored by chandan's avatar chandan Committed by Chris Mason

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: default avatarchandan <chandan@linux.vnet.ibm.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent a0634be5
...@@ -3310,7 +3310,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) ...@@ -3310,7 +3310,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
} }
if (!objectid) if (!objectid)
objectid = root->root_key.objectid; objectid = BTRFS_FS_TREE_OBJECTID;
location.objectid = objectid; location.objectid = objectid;
location.type = BTRFS_ROOT_ITEM_KEY; location.type = BTRFS_ROOT_ITEM_KEY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment