summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/disk-io.c2
-rw-r--r--fs/btrfs/super.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 78247522c693..b6d11eb4e430 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2427,7 +2427,6 @@ retry_root_backup:
up_read(&fs_info->cleanup_work_sem);
if (err) {
close_ctree(tree_root);
- free_fs_info(fs_info);
return err;
}
}
@@ -2478,7 +2477,6 @@ fail_srcu:
cleanup_srcu_struct(&fs_info->subvol_srcu);
fail:
btrfs_close_devices(fs_info->fs_devices);
- free_fs_info(fs_info);
return err;
recovery_tree_root:
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index a381f9f9b0c2..8901b6c85260 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -634,7 +634,6 @@ static int btrfs_fill_super(struct super_block *sb,
fail_close:
close_ctree(tree_root);
- free_fs_info(fs_info);
return err;
}
@@ -947,6 +946,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
error = btrfs_fill_super(s, fs_devices, data,
flags & MS_SILENT ? 1 : 0);
if (error) {
+ free_fs_info(fs_info);
deactivate_locked_super(s);
return ERR_PTR(error);
}