mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 10:29:37 +00:00
btrfs: make free_fs_info() call ->kill_sb() unconditional
... and don't bother with it after btrfs_fill_super() failure - ->kill_sb() (unlike ->put_super()) will be called even if we have not got non-NULL ->s_root. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
be7e0950de
commit
d22ca7de77
1 changed files with 2 additions and 6 deletions
|
@ -946,7 +946,6 @@ 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);
|
||||
}
|
||||
|
@ -1215,12 +1214,9 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||
|
||||
static void btrfs_kill_super(struct super_block *sb)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = NULL;
|
||||
if (sb->s_root)
|
||||
fs_info = btrfs_sb(sb)->fs_info;
|
||||
struct btrfs_fs_info *fs_info = btrfs_sb(sb)->fs_info;
|
||||
kill_anon_super(sb);
|
||||
if (fs_info)
|
||||
free_fs_info(fs_info);
|
||||
free_fs_info(fs_info);
|
||||
}
|
||||
|
||||
static struct file_system_type btrfs_fs_type = {
|
||||
|
|
Loading…
Reference in a new issue