Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: David Sterba <dsterba@suse.cz>

+10 -12
+4 -5
fs/btrfs/disk-io.c
··· 1080 1080 root->log_transid = 0; 1081 1081 root->last_log_commit = 0; 1082 1082 extent_io_tree_init(&root->dirty_log_pages, 1083 - fs_info->btree_inode->i_mapping, GFP_NOFS); 1083 + fs_info->btree_inode->i_mapping); 1084 1084 1085 1085 memset(&root->root_key, 0, sizeof(root->root_key)); 1086 1086 memset(&root->root_item, 0, sizeof(root->root_item)); ··· 1712 1712 1713 1713 RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node); 1714 1714 extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree, 1715 - fs_info->btree_inode->i_mapping, 1716 - GFP_NOFS); 1715 + fs_info->btree_inode->i_mapping); 1717 1716 extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree, 1718 1717 GFP_NOFS); 1719 1718 ··· 1728 1729 fs_info->block_group_cache_tree = RB_ROOT; 1729 1730 1730 1731 extent_io_tree_init(&fs_info->freed_extents[0], 1731 - fs_info->btree_inode->i_mapping, GFP_NOFS); 1732 + fs_info->btree_inode->i_mapping); 1732 1733 extent_io_tree_init(&fs_info->freed_extents[1], 1733 - fs_info->btree_inode->i_mapping, GFP_NOFS); 1734 + fs_info->btree_inode->i_mapping); 1734 1735 fs_info->pinned_extents = &fs_info->freed_extents[0]; 1735 1736 fs_info->do_barriers = 1; 1736 1737
+1 -1
fs/btrfs/extent_io.c
··· 101 101 } 102 102 103 103 void extent_io_tree_init(struct extent_io_tree *tree, 104 - struct address_space *mapping, gfp_t mask) 104 + struct address_space *mapping) 105 105 { 106 106 tree->state = RB_ROOT; 107 107 INIT_RADIX_TREE(&tree->buffer, GFP_ATOMIC);
+1 -1
fs/btrfs/extent_io.h
··· 169 169 int create); 170 170 171 171 void extent_io_tree_init(struct extent_io_tree *tree, 172 - struct address_space *mapping, gfp_t mask); 172 + struct address_space *mapping); 173 173 int try_release_extent_mapping(struct extent_map_tree *map, 174 174 struct extent_io_tree *tree, struct page *page, 175 175 gfp_t mask);
+2 -2
fs/btrfs/inode.c
··· 6786 6786 6787 6787 inode = &ei->vfs_inode; 6788 6788 extent_map_tree_init(&ei->extent_tree, GFP_NOFS); 6789 - extent_io_tree_init(&ei->io_tree, &inode->i_data, GFP_NOFS); 6790 - extent_io_tree_init(&ei->io_failure_tree, &inode->i_data, GFP_NOFS); 6789 + extent_io_tree_init(&ei->io_tree, &inode->i_data); 6790 + extent_io_tree_init(&ei->io_failure_tree, &inode->i_data); 6791 6791 mutex_init(&ei->log_mutex); 6792 6792 btrfs_ordered_inode_tree_init(&ei->ordered_tree); 6793 6793 INIT_LIST_HEAD(&ei->i_orphan);
+1 -1
fs/btrfs/relocation.c
··· 3935 3935 INIT_LIST_HEAD(&rc->reloc_roots); 3936 3936 backref_cache_init(&rc->backref_cache); 3937 3937 mapping_tree_init(&rc->reloc_root_tree); 3938 - extent_io_tree_init(&rc->processed_blocks, NULL, GFP_NOFS); 3938 + extent_io_tree_init(&rc->processed_blocks, NULL); 3939 3939 return rc; 3940 3940 } 3941 3941
+1 -2
fs/btrfs/transaction.c
··· 80 80 INIT_LIST_HEAD(&cur_trans->pending_snapshots); 81 81 list_add_tail(&cur_trans->list, &root->fs_info->trans_list); 82 82 extent_io_tree_init(&cur_trans->dirty_pages, 83 - root->fs_info->btree_inode->i_mapping, 84 - GFP_NOFS); 83 + root->fs_info->btree_inode->i_mapping); 85 84 spin_lock(&root->fs_info->new_trans_lock); 86 85 root->fs_info->running_transaction = cur_trans; 87 86 spin_unlock(&root->fs_info->new_trans_lock);