diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index b9fd62a0fca2..e9f876a1655b 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -901,12 +901,11 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
901 | if (!fs_info) | 901 | if (!fs_info) |
902 | return ERR_PTR(-ENOMEM); | 902 | return ERR_PTR(-ENOMEM); |
903 | 903 | ||
904 | fs_info->tree_root = kzalloc(sizeof(struct btrfs_root), GFP_NOFS); | 904 | fs_info->tree_root = btrfs_alloc_root(fs_info); |
905 | if (!fs_info->tree_root) { | 905 | if (!fs_info->tree_root) { |
906 | error = -ENOMEM; | 906 | error = -ENOMEM; |
907 | goto error_fs_info; | 907 | goto error_fs_info; |
908 | } | 908 | } |
909 | fs_info->tree_root->fs_info = fs_info; | ||
910 | fs_info->fs_devices = fs_devices; | 909 | fs_info->fs_devices = fs_devices; |
911 | 910 | ||
912 | fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_NOFS); | 911 | fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_NOFS); |