aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-10-07 15:14:44 -0400
committerChris Mason <chris.mason@fusionio.com>2013-11-11 21:56:17 -0500
commit2b1360da35877cd969ed83884d8989ba778254d0 (patch)
treed3a6cdd5f0389f3d5859aaf599a18b0a058a7f51 /fs/btrfs
parent681ae50917df9fd1fae2571fb36a579d1e872b12 (diff)
Btrfs: free up block groups after everything
If we abort a transaction we will do the tree log cleanup at unmount, but this happens after we free up the block groups. This makes all the leak detection warnings go off because we think we've leaked space but in reality we just haven't cleaned it up yet. So instead do the block group cleanup stuff after free'ing the fs roots so we don't get these warnings. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index fdc75ab09483..419968e3eaa0 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3637,12 +3637,12 @@ int close_ctree(struct btrfs_root *root)
3637 percpu_counter_sum(&fs_info->delalloc_bytes)); 3637 percpu_counter_sum(&fs_info->delalloc_bytes));
3638 } 3638 }
3639 3639
3640 btrfs_free_block_groups(fs_info);
3641
3642 btrfs_stop_all_workers(fs_info); 3640 btrfs_stop_all_workers(fs_info);
3643 3641
3644 del_fs_roots(fs_info); 3642 del_fs_roots(fs_info);
3645 3643
3644 btrfs_free_block_groups(fs_info);
3645
3646 free_root_pointers(fs_info, 1); 3646 free_root_pointers(fs_info, 1);
3647 3647
3648 iput(fs_info->btree_inode); 3648 iput(fs_info->btree_inode);