xarray: Add definition of struct xarray

This is a direct replacement for struct radix_tree_root.  Some of the
struct members have changed name; convert those, and use a #define so
that radix_tree users continue to work without change.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
This commit is contained in:
Matthew Wilcox
2017-11-07 16:30:10 -05:00
parent 02c02bf12c
commit f8d5d0cc14
12 changed files with 181 additions and 68 deletions

View File

@@ -192,13 +192,13 @@ static void multiorder_shrink(unsigned long index, int order)
assert(item_insert_order(&tree, 0, order) == 0);
node = tree.rnode;
node = tree.xa_head;
assert(item_insert(&tree, index) == 0);
assert(node != tree.rnode);
assert(node != tree.xa_head);
assert(item_delete(&tree, index) != 0);
assert(node == tree.rnode);
assert(node == tree.xa_head);
for (i = 0; i < max; i++) {
struct item *item = item_lookup(&tree, i);