summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorchandan <chandan@linux.vnet.ibm.com>2013-09-13 16:04:10 +0200
committerChris Mason <chris.mason@fusionio.com>2013-09-21 17:05:29 +0200
commit1cecf579d161527f610ef0da852dd6122e434a49 (patch)
tree6dcba0af6eccf6e59401c1bc04bbc60da6990ed7 /fs
parentBtrfs: don't leak transaction in btrfs_sync_file() (diff)
downloadlinux-1cecf579d161527f610ef0da852dd6122e434a49.tar.xz
linux-1cecf579d161527f610ef0da852dd6122e434a49.zip
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;