提交 f993c883 编写于 作者: D David Sterba

btrfs: drop unused argument from extent_io_tree_init

all callers pass GFP_NOFS, but the GFP mask argument is not used in the
function; GFP_ATOMIC is passed to radix tree initialization and it's the
only correct one, since we're using the preload/insert mechanism of
radix tree.
Let's drop the gfp mask from btrfs function, this will not change
behaviour.
Signed-off-by: NDavid Sterba <dsterba@suse.cz>
上级 62a45b60
...@@ -1080,7 +1080,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, ...@@ -1080,7 +1080,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
root->log_transid = 0; root->log_transid = 0;
root->last_log_commit = 0; root->last_log_commit = 0;
extent_io_tree_init(&root->dirty_log_pages, extent_io_tree_init(&root->dirty_log_pages,
fs_info->btree_inode->i_mapping, GFP_NOFS); fs_info->btree_inode->i_mapping);
memset(&root->root_key, 0, sizeof(root->root_key)); memset(&root->root_key, 0, sizeof(root->root_key));
memset(&root->root_item, 0, sizeof(root->root_item)); memset(&root->root_item, 0, sizeof(root->root_item));
...@@ -1712,8 +1712,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, ...@@ -1712,8 +1712,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);
GFP_NOFS);
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); GFP_NOFS);
...@@ -1729,9 +1728,9 @@ struct btrfs_root *open_ctree(struct super_block *sb, ...@@ -1729,9 +1728,9 @@ struct btrfs_root *open_ctree(struct super_block *sb,
fs_info->block_group_cache_tree = RB_ROOT; fs_info->block_group_cache_tree = RB_ROOT;
extent_io_tree_init(&fs_info->freed_extents[0], extent_io_tree_init(&fs_info->freed_extents[0],
fs_info->btree_inode->i_mapping, GFP_NOFS); fs_info->btree_inode->i_mapping);
extent_io_tree_init(&fs_info->freed_extents[1], extent_io_tree_init(&fs_info->freed_extents[1],
fs_info->btree_inode->i_mapping, GFP_NOFS); fs_info->btree_inode->i_mapping);
fs_info->pinned_extents = &fs_info->freed_extents[0]; fs_info->pinned_extents = &fs_info->freed_extents[0];
fs_info->do_barriers = 1; fs_info->do_barriers = 1;
......
...@@ -101,7 +101,7 @@ void extent_io_exit(void) ...@@ -101,7 +101,7 @@ void extent_io_exit(void)
} }
void extent_io_tree_init(struct extent_io_tree *tree, void extent_io_tree_init(struct extent_io_tree *tree,
struct address_space *mapping, gfp_t mask) struct address_space *mapping)
{ {
tree->state = RB_ROOT; tree->state = RB_ROOT;
INIT_RADIX_TREE(&tree->buffer, GFP_ATOMIC); INIT_RADIX_TREE(&tree->buffer, GFP_ATOMIC);
......
...@@ -169,7 +169,7 @@ typedef struct extent_map *(get_extent_t)(struct inode *inode, ...@@ -169,7 +169,7 @@ typedef struct extent_map *(get_extent_t)(struct inode *inode,
int create); int create);
void extent_io_tree_init(struct extent_io_tree *tree, void extent_io_tree_init(struct extent_io_tree *tree,
struct address_space *mapping, gfp_t mask); struct address_space *mapping);
int try_release_extent_mapping(struct extent_map_tree *map, int try_release_extent_mapping(struct extent_map_tree *map,
struct extent_io_tree *tree, struct page *page, struct extent_io_tree *tree, struct page *page,
gfp_t mask); gfp_t mask);
......
...@@ -6786,8 +6786,8 @@ struct inode *btrfs_alloc_inode(struct super_block *sb) ...@@ -6786,8 +6786,8 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
inode = &ei->vfs_inode; inode = &ei->vfs_inode;
extent_map_tree_init(&ei->extent_tree, GFP_NOFS); extent_map_tree_init(&ei->extent_tree, GFP_NOFS);
extent_io_tree_init(&ei->io_tree, &inode->i_data, GFP_NOFS); extent_io_tree_init(&ei->io_tree, &inode->i_data);
extent_io_tree_init(&ei->io_failure_tree, &inode->i_data, GFP_NOFS); extent_io_tree_init(&ei->io_failure_tree, &inode->i_data);
mutex_init(&ei->log_mutex); mutex_init(&ei->log_mutex);
btrfs_ordered_inode_tree_init(&ei->ordered_tree); btrfs_ordered_inode_tree_init(&ei->ordered_tree);
INIT_LIST_HEAD(&ei->i_orphan); INIT_LIST_HEAD(&ei->i_orphan);
......
...@@ -3935,7 +3935,7 @@ static struct reloc_control *alloc_reloc_control(void) ...@@ -3935,7 +3935,7 @@ static struct reloc_control *alloc_reloc_control(void)
INIT_LIST_HEAD(&rc->reloc_roots); INIT_LIST_HEAD(&rc->reloc_roots);
backref_cache_init(&rc->backref_cache); backref_cache_init(&rc->backref_cache);
mapping_tree_init(&rc->reloc_root_tree); mapping_tree_init(&rc->reloc_root_tree);
extent_io_tree_init(&rc->processed_blocks, NULL, GFP_NOFS); extent_io_tree_init(&rc->processed_blocks, NULL);
return rc; return rc;
} }
......
...@@ -80,8 +80,7 @@ static noinline int join_transaction(struct btrfs_root *root) ...@@ -80,8 +80,7 @@ static noinline int join_transaction(struct btrfs_root *root)
INIT_LIST_HEAD(&cur_trans->pending_snapshots); INIT_LIST_HEAD(&cur_trans->pending_snapshots);
list_add_tail(&cur_trans->list, &root->fs_info->trans_list); list_add_tail(&cur_trans->list, &root->fs_info->trans_list);
extent_io_tree_init(&cur_trans->dirty_pages, extent_io_tree_init(&cur_trans->dirty_pages,
root->fs_info->btree_inode->i_mapping, root->fs_info->btree_inode->i_mapping);
GFP_NOFS);
spin_lock(&root->fs_info->new_trans_lock); spin_lock(&root->fs_info->new_trans_lock);
root->fs_info->running_transaction = cur_trans; root->fs_info->running_transaction = cur_trans;
spin_unlock(&root->fs_info->new_trans_lock); spin_unlock(&root->fs_info->new_trans_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册