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 <chandan@linux.vnet.ibm.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
chandan 2013-09-13 19:34:10 +05:30 committed by Chris Mason
parent a0634be562
commit 1cecf579d1
1 changed files with 1 additions and 1 deletions

View File

@ -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;