mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
radix tree tests: Convert item_delete_rcu to XArray
In preparation for the removal of the multiorder radix tree code, convert item_delete_rcu() to use the XArray so it can still be called for XArrays containing multi-index entries. Signed-off-by: Matthew Wilcox <willy@infradead.org>
This commit is contained in:
parent
ccc89e30fa
commit
b66b5a48b8
2 changed files with 3 additions and 3 deletions
|
@ -76,9 +76,9 @@ static void item_free_rcu(struct rcu_head *head)
|
|||
free(item);
|
||||
}
|
||||
|
||||
int item_delete_rcu(struct radix_tree_root *root, unsigned long index)
|
||||
int item_delete_rcu(struct xarray *xa, unsigned long index)
|
||||
{
|
||||
struct item *item = radix_tree_delete(root, index);
|
||||
struct item *item = xa_erase(xa, index);
|
||||
|
||||
if (item) {
|
||||
item_sanity(item, index);
|
||||
|
|
|
@ -15,7 +15,7 @@ int item_insert(struct radix_tree_root *root, unsigned long index);
|
|||
void item_sanity(struct item *item, unsigned long index);
|
||||
void item_free(struct item *item, unsigned long index);
|
||||
int item_delete(struct radix_tree_root *root, unsigned long index);
|
||||
int item_delete_rcu(struct radix_tree_root *root, unsigned long index);
|
||||
int item_delete_rcu(struct xarray *xa, unsigned long index);
|
||||
struct item *item_lookup(struct radix_tree_root *root, unsigned long index);
|
||||
|
||||
void item_check_present(struct radix_tree_root *root, unsigned long index);
|
||||
|
|
Loading…
Reference in a new issue