diff options
author | David Sterba <dsterba@suse.cz> | 2011-04-20 17:35:57 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-05-02 07:57:21 -0400 |
commit | f993c883ad8e111fb9e9ae603540acbe94f7246c (patch) | |
tree | 8c57c5377bff275e0a6e0d75284ab81fd74109a5 | |
parent | 62a45b60923a576170a1a0c309c240d9f40d193d (diff) |
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>
-rw-r--r-- | fs/btrfs/disk-io.c | 9 | ||||
-rw-r--r-- | fs/btrfs/extent_io.c | 2 | ||||
-rw-r--r-- | fs/btrfs/extent_io.h | 2 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 4 | ||||
-rw-r--r-- | fs/btrfs/relocation.c | 2 | ||||
-rw-r--r-- | fs/btrfs/transaction.c | 3 |
6 files changed, 10 insertions, 12 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 25e4b8f1d0ef..3ce80f71e98a 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1080,7 +1080,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, | |||
1080 | root->log_transid = 0; | 1080 | root->log_transid = 0; |
1081 | root->last_log_commit = 0; | 1081 | root->last_log_commit = 0; |
1082 | extent_io_tree_init(&root->dirty_log_pages, | 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 | memset(&root->root_key, 0, sizeof(root->root_key)); | 1085 | memset(&root->root_key, 0, sizeof(root->root_key)); |
1086 | memset(&root->root_item, 0, sizeof(root->root_item)); | 1086 | memset(&root->root_item, 0, sizeof(root->root_item)); |
@@ -1712,8 +1712,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1712 | 1712 | ||
1713 | RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node); | 1713 | RB_CLEAR_NODE(&BTRFS_I(fs_info->btree_inode)->rb_node); |
1714 | extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree, | 1714 | extent_io_tree_init(&BTRFS_I(fs_info->btree_inode)->io_tree, |
1715 | fs_info->btree_inode->i_mapping, | 1715 | fs_info->btree_inode->i_mapping); |
1716 | GFP_NOFS); | ||
1717 | extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree, | 1716 | extent_map_tree_init(&BTRFS_I(fs_info->btree_inode)->extent_tree, |
1718 | GFP_NOFS); | 1717 | GFP_NOFS); |
1719 | 1718 | ||
@@ -1729,9 +1728,9 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1729 | fs_info->block_group_cache_tree = RB_ROOT; | 1728 | fs_info->block_group_cache_tree = RB_ROOT; |
1730 | 1729 | ||
1731 | extent_io_tree_init(&fs_info->freed_extents[0], | 1730 | extent_io_tree_init(&fs_info->freed_extents[0], |
1732 | fs_info->btree_inode->i_mapping, GFP_NOFS); | 1731 | fs_info->btree_inode->i_mapping); |
1733 | extent_io_tree_init(&fs_info->freed_extents[1], | 1732 | extent_io_tree_init(&fs_info->freed_extents[1], |
1734 | fs_info->btree_inode->i_mapping, GFP_NOFS); | 1733 | fs_info->btree_inode->i_mapping); |
1735 | fs_info->pinned_extents = &fs_info->freed_extents[0]; | 1734 | fs_info->pinned_extents = &fs_info->freed_extents[0]; |
1736 | fs_info->do_barriers = 1; | 1735 | fs_info->do_barriers = 1; |
1737 | 1736 | ||
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3c92712e9763..e67ed76668e0 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -101,7 +101,7 @@ void extent_io_exit(void) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | void extent_io_tree_init(struct extent_io_tree *tree, | 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 | tree->state = RB_ROOT; | 106 | tree->state = RB_ROOT; |
107 | INIT_RADIX_TREE(&tree->buffer, GFP_ATOMIC); | 107 | INIT_RADIX_TREE(&tree->buffer, GFP_ATOMIC); |
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index b9ce2f720742..e9cfe8d1661c 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -169,7 +169,7 @@ typedef struct extent_map *(get_extent_t)(struct inode *inode, | |||
169 | int create); | 169 | int create); |
170 | 170 | ||
171 | void extent_io_tree_init(struct extent_io_tree *tree, | 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 | int try_release_extent_mapping(struct extent_map_tree *map, | 173 | int try_release_extent_mapping(struct extent_map_tree *map, |
174 | struct extent_io_tree *tree, struct page *page, | 174 | struct extent_io_tree *tree, struct page *page, |
175 | gfp_t mask); | 175 | gfp_t mask); |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ba760c3ced28..3c98164f8b24 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -6786,8 +6786,8 @@ struct inode *btrfs_alloc_inode(struct super_block *sb) | |||
6786 | 6786 | ||
6787 | inode = &ei->vfs_inode; | 6787 | inode = &ei->vfs_inode; |
6788 | extent_map_tree_init(&ei->extent_tree, GFP_NOFS); | 6788 | extent_map_tree_init(&ei->extent_tree, GFP_NOFS); |
6789 | extent_io_tree_init(&ei->io_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, GFP_NOFS); | 6790 | extent_io_tree_init(&ei->io_failure_tree, &inode->i_data); |
6791 | mutex_init(&ei->log_mutex); | 6791 | mutex_init(&ei->log_mutex); |
6792 | btrfs_ordered_inode_tree_init(&ei->ordered_tree); | 6792 | btrfs_ordered_inode_tree_init(&ei->ordered_tree); |
6793 | INIT_LIST_HEAD(&ei->i_orphan); | 6793 | INIT_LIST_HEAD(&ei->i_orphan); |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index fed0aaec0753..f3edf45317bc 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -3935,7 +3935,7 @@ static struct reloc_control *alloc_reloc_control(void) | |||
3935 | INIT_LIST_HEAD(&rc->reloc_roots); | 3935 | INIT_LIST_HEAD(&rc->reloc_roots); |
3936 | backref_cache_init(&rc->backref_cache); | 3936 | backref_cache_init(&rc->backref_cache); |
3937 | mapping_tree_init(&rc->reloc_root_tree); | 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 | return rc; | 3939 | return rc; |
3940 | } | 3940 | } |
3941 | 3941 | ||
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c571734d5e5a..955f76eb0fa8 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -80,8 +80,7 @@ static noinline int join_transaction(struct btrfs_root *root) | |||
80 | INIT_LIST_HEAD(&cur_trans->pending_snapshots); | 80 | INIT_LIST_HEAD(&cur_trans->pending_snapshots); |
81 | list_add_tail(&cur_trans->list, &root->fs_info->trans_list); | 81 | list_add_tail(&cur_trans->list, &root->fs_info->trans_list); |
82 | extent_io_tree_init(&cur_trans->dirty_pages, | 82 | extent_io_tree_init(&cur_trans->dirty_pages, |
83 | root->fs_info->btree_inode->i_mapping, | 83 | root->fs_info->btree_inode->i_mapping); |
84 | GFP_NOFS); | ||
85 | spin_lock(&root->fs_info->new_trans_lock); | 84 | spin_lock(&root->fs_info->new_trans_lock); |
86 | root->fs_info->running_transaction = cur_trans; | 85 | root->fs_info->running_transaction = cur_trans; |
87 | spin_unlock(&root->fs_info->new_trans_lock); | 86 | spin_unlock(&root->fs_info->new_trans_lock); |