diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/disk-io.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 47c2bc21caad..7619147da382 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2745,13 +2745,13 @@ retry_root_backup: | |||
2745 | ret = btrfs_init_space_info(fs_info); | 2745 | ret = btrfs_init_space_info(fs_info); |
2746 | if (ret) { | 2746 | if (ret) { |
2747 | printk(KERN_ERR "BTRFS: Failed to initial space info: %d\n", ret); | 2747 | printk(KERN_ERR "BTRFS: Failed to initial space info: %d\n", ret); |
2748 | goto fail_block_groups; | 2748 | goto fail_sysfs; |
2749 | } | 2749 | } |
2750 | 2750 | ||
2751 | ret = btrfs_read_block_groups(extent_root); | 2751 | ret = btrfs_read_block_groups(extent_root); |
2752 | if (ret) { | 2752 | if (ret) { |
2753 | printk(KERN_ERR "BTRFS: Failed to read block groups: %d\n", ret); | 2753 | printk(KERN_ERR "BTRFS: Failed to read block groups: %d\n", ret); |
2754 | goto fail_block_groups; | 2754 | goto fail_sysfs; |
2755 | } | 2755 | } |
2756 | fs_info->num_tolerated_disk_barrier_failures = | 2756 | fs_info->num_tolerated_disk_barrier_failures = |
2757 | btrfs_calc_num_tolerated_disk_barrier_failures(fs_info); | 2757 | btrfs_calc_num_tolerated_disk_barrier_failures(fs_info); |
@@ -2760,13 +2760,13 @@ retry_root_backup: | |||
2760 | !(sb->s_flags & MS_RDONLY)) { | 2760 | !(sb->s_flags & MS_RDONLY)) { |
2761 | printk(KERN_WARNING "BTRFS: " | 2761 | printk(KERN_WARNING "BTRFS: " |
2762 | "too many missing devices, writeable mount is not allowed\n"); | 2762 | "too many missing devices, writeable mount is not allowed\n"); |
2763 | goto fail_block_groups; | 2763 | goto fail_sysfs; |
2764 | } | 2764 | } |
2765 | 2765 | ||
2766 | fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, | 2766 | fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, |
2767 | "btrfs-cleaner"); | 2767 | "btrfs-cleaner"); |
2768 | if (IS_ERR(fs_info->cleaner_kthread)) | 2768 | if (IS_ERR(fs_info->cleaner_kthread)) |
2769 | goto fail_block_groups; | 2769 | goto fail_sysfs; |
2770 | 2770 | ||
2771 | fs_info->transaction_kthread = kthread_run(transaction_kthread, | 2771 | fs_info->transaction_kthread = kthread_run(transaction_kthread, |
2772 | tree_root, | 2772 | tree_root, |
@@ -2948,6 +2948,9 @@ fail_cleaner: | |||
2948 | */ | 2948 | */ |
2949 | filemap_write_and_wait(fs_info->btree_inode->i_mapping); | 2949 | filemap_write_and_wait(fs_info->btree_inode->i_mapping); |
2950 | 2950 | ||
2951 | fail_sysfs: | ||
2952 | btrfs_sysfs_remove_one(fs_info); | ||
2953 | |||
2951 | fail_block_groups: | 2954 | fail_block_groups: |
2952 | btrfs_put_block_group_cache(fs_info); | 2955 | btrfs_put_block_group_cache(fs_info); |
2953 | btrfs_free_block_groups(fs_info); | 2956 | btrfs_free_block_groups(fs_info); |