diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 4 | ||||
-rw-r--r-- | fs/btrfs/free-space-cache.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0b5643a68d57..4965a0179b31 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2543,8 +2543,6 @@ int close_ctree(struct btrfs_root *root) | |||
2543 | /* clear out the rbtree of defraggable inodes */ | 2543 | /* clear out the rbtree of defraggable inodes */ |
2544 | btrfs_run_defrag_inodes(root->fs_info); | 2544 | btrfs_run_defrag_inodes(root->fs_info); |
2545 | 2545 | ||
2546 | btrfs_put_block_group_cache(fs_info); | ||
2547 | |||
2548 | /* | 2546 | /* |
2549 | * Here come 2 situations when btrfs is broken to flip readonly: | 2547 | * Here come 2 situations when btrfs is broken to flip readonly: |
2550 | * | 2548 | * |
@@ -2570,6 +2568,8 @@ int close_ctree(struct btrfs_root *root) | |||
2570 | printk(KERN_ERR "btrfs: commit super ret %d\n", ret); | 2568 | printk(KERN_ERR "btrfs: commit super ret %d\n", ret); |
2571 | } | 2569 | } |
2572 | 2570 | ||
2571 | btrfs_put_block_group_cache(fs_info); | ||
2572 | |||
2573 | kthread_stop(root->fs_info->transaction_kthread); | 2573 | kthread_stop(root->fs_info->transaction_kthread); |
2574 | kthread_stop(root->fs_info->cleaner_kthread); | 2574 | kthread_stop(root->fs_info->cleaner_kthread); |
2575 | 2575 | ||
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 701ef5951e3f..1ea10731797a 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -105,7 +105,7 @@ struct inode *lookup_free_space_inode(struct btrfs_root *root, | |||
105 | block_group->disk_cache_state = BTRFS_DC_CLEAR; | 105 | block_group->disk_cache_state = BTRFS_DC_CLEAR; |
106 | } | 106 | } |
107 | 107 | ||
108 | if (!btrfs_fs_closing(root->fs_info)) { | 108 | if (!block_group->iref) { |
109 | block_group->inode = igrab(inode); | 109 | block_group->inode = igrab(inode); |
110 | block_group->iref = 1; | 110 | block_group->iref = 1; |
111 | } | 111 | } |