aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 92393cc60d08..77c5eff3e209 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -285,11 +285,11 @@ static int btrfs_parse_early_options(const char *options, int flags,
285 out: 285 out:
286 /* 286 /*
287 * If no subvolume name is specified we use the default one. Allocate 287 * If no subvolume name is specified we use the default one. Allocate
288 * a copy of the string "default" here so that code later in the 288 * a copy of the string "." here so that code later in the
289 * mount path doesn't care if it's the default volume or another one. 289 * mount path doesn't care if it's the default volume or another one.
290 */ 290 */
291 if (!*subvol_name) { 291 if (!*subvol_name) {
292 *subvol_name = kstrdup("default", GFP_KERNEL); 292 *subvol_name = kstrdup(".", GFP_KERNEL);
293 if (!*subvol_name) 293 if (!*subvol_name)
294 return -ENOMEM; 294 return -ENOMEM;
295 } 295 }
@@ -323,12 +323,12 @@ static int btrfs_fill_super(struct super_block * sb,
323 } 323 }
324 sb->s_fs_info = tree_root; 324 sb->s_fs_info = tree_root;
325 disk_super = &tree_root->fs_info->super_copy; 325 disk_super = &tree_root->fs_info->super_copy;
326 inode = btrfs_iget_locked(sb, btrfs_super_root_dir(disk_super), 326 inode = btrfs_iget_locked(sb, BTRFS_FIRST_FREE_OBJECTID,
327 tree_root); 327 tree_root->fs_info->fs_root);
328 bi = BTRFS_I(inode); 328 bi = BTRFS_I(inode);
329 bi->location.objectid = inode->i_ino; 329 bi->location.objectid = inode->i_ino;
330 bi->location.offset = 0; 330 bi->location.offset = 0;
331 bi->root = tree_root; 331 bi->root = tree_root->fs_info->fs_root;
332 332
333 btrfs_set_key_type(&bi->location, BTRFS_INODE_ITEM_KEY); 333 btrfs_set_key_type(&bi->location, BTRFS_INODE_ITEM_KEY);
334 334