aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/test.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2016-05-20 17:03:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-20 17:58:30 -0700
commit4dd6c0987ca43d6544f4f0a3f86f6ea3bfc60fc1 (patch)
treeeae410dd9f1b23d16b2cd646065f93653bb48b5e /tools/testing/radix-tree/test.c
parentradix-tree: rename ptr_to_indirect() to node_to_entry() (diff)
downloadlinux-dev-4dd6c0987ca43d6544f4f0a3f86f6ea3bfc60fc1.tar.xz
linux-dev-4dd6c0987ca43d6544f4f0a3f86f6ea3bfc60fc1.zip
radix-tree: rename indirect_to_ptr() to entry_to_node()
Mirrors the earlier commit introducing node_to_entry(). Also change the type returned to be a struct radix_tree_node pointer. That lets us simplify a couple of places in the radix tree shrink & extend paths where we could convert an entry into a pointer, modify the node, then convert the pointer back into an entry. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/radix-tree/test.c')
-rw-r--r--tools/testing/radix-tree/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/radix-tree/test.c b/tools/testing/radix-tree/test.c
index 3004c58b9021..7b0bc1fa5919 100644
--- a/tools/testing/radix-tree/test.c
+++ b/tools/testing/radix-tree/test.c
@@ -149,7 +149,7 @@ static int verify_node(struct radix_tree_node *slot, unsigned int tag,
int i;
int j;
- slot = indirect_to_ptr(slot);
+ slot = entry_to_node(slot);
/* Verify consistency at this level */
for (i = 0; i < RADIX_TREE_TAG_LONGS; i++) {
@@ -227,7 +227,7 @@ void tree_verify_min_height(struct radix_tree_root *root, int maxindex)
return;
}
- node = indirect_to_ptr(node);
+ node = entry_to_node(node);
assert(maxindex <= node_maxindex(node));
shift = node->shift;