Commit cda83bb8 authored by wuchi's avatar wuchi Committed by akpm

lib/radix-tree: remove unused argument of insert_entries

insert_entries() doesn't use the 'bool replace' argument, and the function
is only used locally, remove the argument.

The historical context of the unused argument is as follow:

2: commit <3a08cd52> (radix tree: Remove multiorder support)
  Remove the code related to macro CONFIG_RADIX_TREE_MULTIORDER
to convert to the xArray.
  Without the macro, there is no need to retain the argument.

1: commit <175542f5> (radix-tree: add radix_tree_join)
  Add insert_entries(..., bool replace) function, depending on the
macro CONFIG_RADIX_TREE_MULTIORDER definition, the implementation
is different. Notice that the implementation without the macro doesn't
use the argument.

[Matthew Wilcox: add historical context for argument]

Link: https://lkml.kernel.org/r/20220625135324.72574-1-wuchi.zero@gmail.comSigned-off-by: default avatarwuchi <wuchi.zero@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 045ed31e
...@@ -677,7 +677,7 @@ static void radix_tree_free_nodes(struct radix_tree_node *node) ...@@ -677,7 +677,7 @@ static void radix_tree_free_nodes(struct radix_tree_node *node)
} }
static inline int insert_entries(struct radix_tree_node *node, static inline int insert_entries(struct radix_tree_node *node,
void __rcu **slot, void *item, bool replace) void __rcu **slot, void *item)
{ {
if (*slot) if (*slot)
return -EEXIST; return -EEXIST;
...@@ -711,7 +711,7 @@ int radix_tree_insert(struct radix_tree_root *root, unsigned long index, ...@@ -711,7 +711,7 @@ int radix_tree_insert(struct radix_tree_root *root, unsigned long index,
if (error) if (error)
return error; return error;
error = insert_entries(node, slot, item, false); error = insert_entries(node, slot, item);
if (error < 0) if (error < 0)
return error; return error;
......
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