diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-17 01:40:05 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-08 19:34:40 -0500 |
commit | be7e0950def403e90b5295ff2192c39967bf2aec (patch) | |
tree | ee468d0b63e30ac8270e1daabc823b51e4759f25 /fs | |
parent | 29db78aa0ac82319b764b87a1c5030d74523e296 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 | ||||
-rw-r--r-- | fs/btrfs/super.c | 2 |
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: | |||
2427 | up_read(&fs_info->cleanup_work_sem); | 2427 | up_read(&fs_info->cleanup_work_sem); |
2428 | if (err) { | 2428 | if (err) { |
2429 | close_ctree(tree_root); | 2429 | close_ctree(tree_root); |
2430 | free_fs_info(fs_info); | ||
2431 | return err; | 2430 | return err; |
2432 | } | 2431 | } |
2433 | } | 2432 | } |
@@ -2478,7 +2477,6 @@ fail_srcu: | |||
2478 | cleanup_srcu_struct(&fs_info->subvol_srcu); | 2477 | cleanup_srcu_struct(&fs_info->subvol_srcu); |
2479 | fail: | 2478 | fail: |
2480 | btrfs_close_devices(fs_info->fs_devices); | 2479 | btrfs_close_devices(fs_info->fs_devices); |
2481 | free_fs_info(fs_info); | ||
2482 | return err; | 2480 | return err; |
2483 | 2481 | ||
2484 | recovery_tree_root: | 2482 | 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, | |||
634 | 634 | ||
635 | fail_close: | 635 | fail_close: |
636 | close_ctree(tree_root); | 636 | close_ctree(tree_root); |
637 | free_fs_info(fs_info); | ||
638 | return err; | 637 | return err; |
639 | } | 638 | } |
640 | 639 | ||
@@ -947,6 +946,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
947 | error = btrfs_fill_super(s, fs_devices, data, | 946 | error = btrfs_fill_super(s, fs_devices, data, |
948 | flags & MS_SILENT ? 1 : 0); | 947 | flags & MS_SILENT ? 1 : 0); |
949 | if (error) { | 948 | if (error) { |
949 | free_fs_info(fs_info); | ||
950 | deactivate_locked_super(s); | 950 | deactivate_locked_super(s); |
951 | return ERR_PTR(error); | 951 | return ERR_PTR(error); |
952 | } | 952 | } |