summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorchandan <chandan@linux.vnet.ibm.com>2013-09-13 19:34:10 +0530
committerChris Mason <chris.mason@fusionio.com>2013-09-21 11:05:29 -0400
commit1cecf579d161527f610ef0da852dd6122e434a49 (patch)
tree6dcba0af6eccf6e59401c1bc04bbc60da6990ed7 /fs
parenta0634be562c27ddee7c94bce4f765f8071244e07 (diff)
downloadlinux-1cecf579d161527f610ef0da852dd6122e434a49.tar.bz2
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
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;