diff options
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 435ef132b800..81f3433fe4fd 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "rcu-string.h" | 48 | #include "rcu-string.h" |
49 | #include "dev-replace.h" | 49 | #include "dev-replace.h" |
50 | #include "raid56.h" | 50 | #include "raid56.h" |
51 | #include "sysfs.h" | ||
51 | 52 | ||
52 | #ifdef CONFIG_X86 | 53 | #ifdef CONFIG_X86 |
53 | #include <asm/cpufeature.h> | 54 | #include <asm/cpufeature.h> |
@@ -2743,6 +2744,12 @@ retry_root_backup: | |||
2743 | 2744 | ||
2744 | btrfs_close_extra_devices(fs_info, fs_devices, 1); | 2745 | btrfs_close_extra_devices(fs_info, fs_devices, 1); |
2745 | 2746 | ||
2747 | ret = btrfs_sysfs_add_one(fs_info); | ||
2748 | if (ret) { | ||
2749 | pr_err("btrfs: failed to init sysfs interface: %d\n", ret); | ||
2750 | goto fail_block_groups; | ||
2751 | } | ||
2752 | |||
2746 | ret = btrfs_init_space_info(fs_info); | 2753 | ret = btrfs_init_space_info(fs_info); |
2747 | if (ret) { | 2754 | if (ret) { |
2748 | printk(KERN_ERR "Failed to initial space info: %d\n", ret); | 2755 | printk(KERN_ERR "Failed to initial space info: %d\n", ret); |
@@ -3584,6 +3591,8 @@ int close_ctree(struct btrfs_root *root) | |||
3584 | percpu_counter_sum(&fs_info->delalloc_bytes)); | 3591 | percpu_counter_sum(&fs_info->delalloc_bytes)); |
3585 | } | 3592 | } |
3586 | 3593 | ||
3594 | btrfs_sysfs_remove_one(fs_info); | ||
3595 | |||
3587 | del_fs_roots(fs_info); | 3596 | del_fs_roots(fs_info); |
3588 | 3597 | ||
3589 | btrfs_free_block_groups(fs_info); | 3598 | btrfs_free_block_groups(fs_info); |