2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00

btrfs: remove node and parent parameters from insert_state

There's no caller left that would pass valid pointers to insert_state so
we can drop them.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2020-06-25 18:15:31 +02:00
parent fb8f07d2d8
commit c367602a78

View File

@ -525,8 +525,6 @@ static void set_state_bits(struct extent_io_tree *tree,
*/ */
static int insert_state(struct extent_io_tree *tree, static int insert_state(struct extent_io_tree *tree,
struct extent_state *state, struct extent_state *state,
struct rb_node ***node_in,
struct rb_node **parent_in,
u32 bits, struct extent_changeset *changeset) u32 bits, struct extent_changeset *changeset)
{ {
struct rb_node **node; struct rb_node **node;
@ -535,13 +533,6 @@ static int insert_state(struct extent_io_tree *tree,
set_state_bits(tree, state, bits, changeset); set_state_bits(tree, state, bits, changeset);
/* Caller provides the exact tree location */
if (node_in && parent_in) {
node = *node_in;
parent = *parent_in;
goto insert_new;
}
node = &tree->state.rb_node; node = &tree->state.rb_node;
while (*node) { while (*node) {
struct tree_entry *entry; struct tree_entry *entry;
@ -561,7 +552,6 @@ static int insert_state(struct extent_io_tree *tree,
} }
} }
insert_new:
rb_link_node(&state->rb_node, parent, node); rb_link_node(&state->rb_node, parent, node);
rb_insert_color(&state->rb_node, &tree->state); rb_insert_color(&state->rb_node, &tree->state);
@ -1150,7 +1140,7 @@ hit_next:
*/ */
prealloc->start = start; prealloc->start = start;
prealloc->end = this_end; prealloc->end = this_end;
err = insert_state(tree, prealloc, NULL, NULL, bits, changeset); err = insert_state(tree, prealloc, bits, changeset);
if (err) if (err)
extent_io_tree_panic(tree, err); extent_io_tree_panic(tree, err);
@ -1371,7 +1361,7 @@ hit_next:
*/ */
prealloc->start = start; prealloc->start = start;
prealloc->end = this_end; prealloc->end = this_end;
err = insert_state(tree, prealloc, NULL, NULL, bits, NULL); err = insert_state(tree, prealloc, bits, NULL);
if (err) if (err)
extent_io_tree_panic(tree, err); extent_io_tree_panic(tree, err);
cache_state(prealloc, cached_state); cache_state(prealloc, cached_state);