We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d95de1 commit 0c2b2d4Copy full SHA for 0c2b2d4
fs/btrfs/super.c
@@ -2070,7 +2070,13 @@ static int btrfs_get_tree_subvol(struct fs_context *fc)
2070
fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
2071
fs_info->super_for_commit = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
2072
if (!fs_info->super_copy || !fs_info->super_for_commit) {
2073
- btrfs_free_fs_info(fs_info);
+ /*
2074
+ * Dont call btrfs_free_fs_info() to free it as it's still
2075
+ * initialized partially.
2076
+ */
2077
+ kfree(fs_info->super_copy);
2078
+ kfree(fs_info->super_for_commit);
2079
+ kvfree(fs_info);
2080
return -ENOMEM;
2081
}
2082
btrfs_init_fs_info(fs_info);
0 commit comments