mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
btrfs: merge free_fs_info() calls on fill_super failures
... all the way up into btrfs_mount(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
29db78aa0a
commit
be7e0950de
2 changed files with 1 additions and 3 deletions
|
@ -2427,7 +2427,6 @@ int open_ctree(struct super_block *sb,
|
||||||
up_read(&fs_info->cleanup_work_sem);
|
up_read(&fs_info->cleanup_work_sem);
|
||||||
if (err) {
|
if (err) {
|
||||||
close_ctree(tree_root);
|
close_ctree(tree_root);
|
||||||
free_fs_info(fs_info);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2478,7 +2477,6 @@ int open_ctree(struct super_block *sb,
|
||||||
cleanup_srcu_struct(&fs_info->subvol_srcu);
|
cleanup_srcu_struct(&fs_info->subvol_srcu);
|
||||||
fail:
|
fail:
|
||||||
btrfs_close_devices(fs_info->fs_devices);
|
btrfs_close_devices(fs_info->fs_devices);
|
||||||
free_fs_info(fs_info);
|
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
recovery_tree_root:
|
recovery_tree_root:
|
||||||
|
|
|
@ -634,7 +634,6 @@ static int btrfs_fill_super(struct super_block *sb,
|
||||||
|
|
||||||
fail_close:
|
fail_close:
|
||||||
close_ctree(tree_root);
|
close_ctree(tree_root);
|
||||||
free_fs_info(fs_info);
|
|
||||||
return err;
|
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,
|
error = btrfs_fill_super(s, fs_devices, data,
|
||||||
flags & MS_SILENT ? 1 : 0);
|
flags & MS_SILENT ? 1 : 0);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
free_fs_info(fs_info);
|
||||||
deactivate_locked_super(s);
|
deactivate_locked_super(s);
|
||||||
return ERR_PTR(error);
|
return ERR_PTR(error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue