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 8aec9db commit 17679acCopy full SHA for 17679ac
fs/btrfs/super.c
@@ -2068,7 +2068,13 @@ static int btrfs_get_tree_subvol(struct fs_context *fc)
2068
fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
2069
fs_info->super_for_commit = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
2070
if (!fs_info->super_copy || !fs_info->super_for_commit) {
2071
- btrfs_free_fs_info(fs_info);
+ /*
2072
+ * Dont call btrfs_free_fs_info() to free it as it's still
2073
+ * initialized partially.
2074
+ */
2075
+ kfree(fs_info->super_copy);
2076
+ kfree(fs_info->super_for_commit);
2077
+ kvfree(fs_info);
2078
return -ENOMEM;
2079
}
2080
btrfs_init_fs_info(fs_info);
0 commit comments