diff options
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 07b3ac662e19..51372a521167 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1648,6 +1648,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1648 | spin_lock_init(&fs_info->fs_roots_radix_lock); | 1648 | spin_lock_init(&fs_info->fs_roots_radix_lock); |
1649 | spin_lock_init(&fs_info->delayed_iput_lock); | 1649 | spin_lock_init(&fs_info->delayed_iput_lock); |
1650 | spin_lock_init(&fs_info->defrag_inodes_lock); | 1650 | spin_lock_init(&fs_info->defrag_inodes_lock); |
1651 | spin_lock_init(&fs_info->free_chunk_lock); | ||
1651 | mutex_init(&fs_info->reloc_mutex); | 1652 | mutex_init(&fs_info->reloc_mutex); |
1652 | 1653 | ||
1653 | init_completion(&fs_info->kobj_unregister); | 1654 | init_completion(&fs_info->kobj_unregister); |
@@ -1665,8 +1666,6 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1665 | btrfs_init_block_rsv(&fs_info->trans_block_rsv); | 1666 | btrfs_init_block_rsv(&fs_info->trans_block_rsv); |
1666 | btrfs_init_block_rsv(&fs_info->chunk_block_rsv); | 1667 | btrfs_init_block_rsv(&fs_info->chunk_block_rsv); |
1667 | btrfs_init_block_rsv(&fs_info->empty_block_rsv); | 1668 | btrfs_init_block_rsv(&fs_info->empty_block_rsv); |
1668 | INIT_LIST_HEAD(&fs_info->durable_block_rsv_list); | ||
1669 | mutex_init(&fs_info->durable_block_rsv_mutex); | ||
1670 | atomic_set(&fs_info->nr_async_submits, 0); | 1669 | atomic_set(&fs_info->nr_async_submits, 0); |
1671 | atomic_set(&fs_info->async_delalloc_pages, 0); | 1670 | atomic_set(&fs_info->async_delalloc_pages, 0); |
1672 | atomic_set(&fs_info->async_submit_draining, 0); | 1671 | atomic_set(&fs_info->async_submit_draining, 0); |
@@ -1677,6 +1676,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1677 | fs_info->metadata_ratio = 0; | 1676 | fs_info->metadata_ratio = 0; |
1678 | fs_info->defrag_inodes = RB_ROOT; | 1677 | fs_info->defrag_inodes = RB_ROOT; |
1679 | fs_info->trans_no_join = 0; | 1678 | fs_info->trans_no_join = 0; |
1679 | fs_info->free_chunk_space = 0; | ||
1680 | 1680 | ||
1681 | fs_info->thread_pool_size = min_t(unsigned long, | 1681 | fs_info->thread_pool_size = min_t(unsigned long, |
1682 | num_online_cpus() + 2, 8); | 1682 | num_online_cpus() + 2, 8); |
@@ -2545,8 +2545,6 @@ int close_ctree(struct btrfs_root *root) | |||
2545 | /* clear out the rbtree of defraggable inodes */ | 2545 | /* clear out the rbtree of defraggable inodes */ |
2546 | btrfs_run_defrag_inodes(root->fs_info); | 2546 | btrfs_run_defrag_inodes(root->fs_info); |
2547 | 2547 | ||
2548 | btrfs_put_block_group_cache(fs_info); | ||
2549 | |||
2550 | /* | 2548 | /* |
2551 | * Here come 2 situations when btrfs is broken to flip readonly: | 2549 | * Here come 2 situations when btrfs is broken to flip readonly: |
2552 | * | 2550 | * |
@@ -2572,6 +2570,8 @@ int close_ctree(struct btrfs_root *root) | |||
2572 | printk(KERN_ERR "btrfs: commit super ret %d\n", ret); | 2570 | printk(KERN_ERR "btrfs: commit super ret %d\n", ret); |
2573 | } | 2571 | } |
2574 | 2572 | ||
2573 | btrfs_put_block_group_cache(fs_info); | ||
2574 | |||
2575 | kthread_stop(root->fs_info->transaction_kthread); | 2575 | kthread_stop(root->fs_info->transaction_kthread); |
2576 | kthread_stop(root->fs_info->cleaner_kthread); | 2576 | kthread_stop(root->fs_info->cleaner_kthread); |
2577 | 2577 | ||