Commit 4273eaff authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: use bool argument in free_root_pointers()

We don't need int argument bool shall do in free_root_pointers().  And
rename the argument as it confused two people.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ce96b7ff
...@@ -2022,7 +2022,7 @@ static void free_root_extent_buffers(struct btrfs_root *root) ...@@ -2022,7 +2022,7 @@ static void free_root_extent_buffers(struct btrfs_root *root)
} }
/* helper to cleanup tree roots */ /* helper to cleanup tree roots */
static void free_root_pointers(struct btrfs_fs_info *info, int chunk_root) static void free_root_pointers(struct btrfs_fs_info *info, bool free_chunk_root)
{ {
free_root_extent_buffers(info->tree_root); free_root_extent_buffers(info->tree_root);
...@@ -2031,7 +2031,7 @@ static void free_root_pointers(struct btrfs_fs_info *info, int chunk_root) ...@@ -2031,7 +2031,7 @@ static void free_root_pointers(struct btrfs_fs_info *info, int chunk_root)
free_root_extent_buffers(info->csum_root); free_root_extent_buffers(info->csum_root);
free_root_extent_buffers(info->quota_root); free_root_extent_buffers(info->quota_root);
free_root_extent_buffers(info->uuid_root); free_root_extent_buffers(info->uuid_root);
if (chunk_root) if (free_chunk_root)
free_root_extent_buffers(info->chunk_root); free_root_extent_buffers(info->chunk_root);
free_root_extent_buffers(info->free_space_root); free_root_extent_buffers(info->free_space_root);
} }
...@@ -3320,7 +3320,7 @@ int __cold open_ctree(struct super_block *sb, ...@@ -3320,7 +3320,7 @@ int __cold open_ctree(struct super_block *sb,
btrfs_put_block_group_cache(fs_info); btrfs_put_block_group_cache(fs_info);
fail_tree_roots: fail_tree_roots:
free_root_pointers(fs_info, 1); free_root_pointers(fs_info, true);
invalidate_inode_pages2(fs_info->btree_inode->i_mapping); invalidate_inode_pages2(fs_info->btree_inode->i_mapping);
fail_sb_buffer: fail_sb_buffer:
...@@ -3352,7 +3352,7 @@ int __cold open_ctree(struct super_block *sb, ...@@ -3352,7 +3352,7 @@ int __cold open_ctree(struct super_block *sb,
if (!btrfs_test_opt(fs_info, USEBACKUPROOT)) if (!btrfs_test_opt(fs_info, USEBACKUPROOT))
goto fail_tree_roots; goto fail_tree_roots;
free_root_pointers(fs_info, 0); free_root_pointers(fs_info, false);
/* don't use the log in recovery mode, it won't be valid */ /* don't use the log in recovery mode, it won't be valid */
btrfs_set_super_log_root(disk_super, 0); btrfs_set_super_log_root(disk_super, 0);
...@@ -4046,7 +4046,7 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info) ...@@ -4046,7 +4046,7 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
btrfs_free_block_groups(fs_info); btrfs_free_block_groups(fs_info);
clear_bit(BTRFS_FS_OPEN, &fs_info->flags); clear_bit(BTRFS_FS_OPEN, &fs_info->flags);
free_root_pointers(fs_info, 1); free_root_pointers(fs_info, true);
iput(fs_info->btree_inode); iput(fs_info->btree_inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment