Commit a8067e02 authored by David Sterba's avatar David Sterba

btrfs: drop unused parameter from extent_map_tree_init

the GFP flags are not stored anywhere and all allocations are done via
alloc_extent_map(GFP_NOFS).
Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
parent f993c883
...@@ -1713,8 +1713,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, ...@@ -1713,8 +1713,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node); RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node);
extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree, extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree,
fs_info->btree_inode->i_mapping); fs_info->btree_inode->i_mapping);
extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree, extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree);
GFP_NOFS);
BTRFS_I(fs_info->btree_inode)->io_tree.ops = &btree_extent_io_ops; BTRFS_I(fs_info->btree_inode)->io_tree.ops = &btree_extent_io_ops;
......
...@@ -28,12 +28,11 @@ void extent_map_exit(void) ...@@ -28,12 +28,11 @@ void extent_map_exit(void)
/** /**
* extent_map_tree_init - initialize extent map tree * extent_map_tree_init - initialize extent map tree
* @tree: tree to initialize * @tree: tree to initialize
* @mask: flags for memory allocations during tree operations
* *
* Initialize the extent tree @tree. Should be called for each new inode * Initialize the extent tree @tree. Should be called for each new inode
* or other user of the extent_map interface. * or other user of the extent_map interface.
*/ */
void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask) void extent_map_tree_init(struct extent_map_tree *tree)
{ {
tree->map = RB_ROOT; tree->map = RB_ROOT;
rwlock_init(&tree->lock); rwlock_init(&tree->lock);
......
...@@ -49,7 +49,7 @@ static inline u64 extent_map_block_end(struct extent_map *em) ...@@ -49,7 +49,7 @@ static inline u64 extent_map_block_end(struct extent_map *em)
return em->block_start + em->block_len; return em->block_start + em->block_len;
} }
void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask); void extent_map_tree_init(struct extent_map_tree *tree);
struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree, struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
u64 start, u64 len); u64 start, u64 len);
int add_extent_mapping(struct extent_map_tree *tree, int add_extent_mapping(struct extent_map_tree *tree,
......
...@@ -6785,7 +6785,7 @@ struct inode *btrfs_alloc_inode(struct super_block *sb) ...@@ -6785,7 +6785,7 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
ei->force_compress = BTRFS_COMPRESS_NONE; ei->force_compress = BTRFS_COMPRESS_NONE;
inode = &ei->vfs_inode; inode = &ei->vfs_inode;
extent_map_tree_init(&ei->extent_tree, GFP_NOFS); extent_map_tree_init(&ei->extent_tree);
extent_io_tree_init(&ei->io_tree, &inode->i_data); extent_io_tree_init(&ei->io_tree, &inode->i_data);
extent_io_tree_init(&ei->io_failure_tree, &inode->i_data); extent_io_tree_init(&ei->io_failure_tree, &inode->i_data);
mutex_init(&ei->log_mutex); mutex_init(&ei->log_mutex);
......
...@@ -2849,7 +2849,7 @@ int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset) ...@@ -2849,7 +2849,7 @@ int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset)
void btrfs_mapping_init(struct btrfs_mapping_tree *tree) void btrfs_mapping_init(struct btrfs_mapping_tree *tree)
{ {
extent_map_tree_init(&tree->map_tree, GFP_NOFS); extent_map_tree_init(&tree->map_tree);
} }
void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree) void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree)
......
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