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 4537930 commit b1c2b4eCopy full SHA for b1c2b4e
fs/btrfs/super.c
@@ -2029,7 +2029,13 @@ static int btrfs_get_tree_subvol(struct fs_context *fc)
2029
fs_info->super_copy = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
2030
fs_info->super_for_commit = kzalloc(BTRFS_SUPER_INFO_SIZE, GFP_KERNEL);
2031
if (!fs_info->super_copy || !fs_info->super_for_commit) {
2032
- btrfs_free_fs_info(fs_info);
+ /*
2033
+ * Dont call btrfs_free_fs_info() to free it as it's still
2034
+ * initialized partially.
2035
+ */
2036
+ kfree(fs_info->super_copy);
2037
+ kfree(fs_info->super_for_commit);
2038
+ kvfree(fs_info);
2039
return -ENOMEM;
2040
}
2041
btrfs_init_fs_info(fs_info);
0 commit comments