Skip to content

Commit

Permalink
Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
chandan authored and Chris Mason committed Sep 21, 2013
1 parent a0634be commit 1cecf57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1cecf57

Please sign in to comment.