summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2016-03-18 00:21:48 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-18 01:09:34 +0300
commit339e6353046dd4f675304d696a88aefdd727298e (patch)
treebfe0c26987489add8c51ab13dbd65d348445e4b9 /tools
parent1366c37ed84b166a0fffe201154b0d3b78a3976b (diff)
downloadlinux-339e6353046dd4f675304d696a88aefdd727298e.tar.xz
radix_tree: tag all internal tree nodes as indirect pointers
Set the 'indirect_ptr' bit on all the pointers to internal nodes, not just on the root node. This enables the following patches to support multi-order entries in the radix tree. This patch is split out for ease of bisection. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/radix-tree/test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/radix-tree/test.c b/tools/testing/radix-tree/test.c
index c9b0bd75b6c6..2bebf34cdc27 100644
--- a/tools/testing/radix-tree/test.c
+++ b/tools/testing/radix-tree/test.c
@@ -142,6 +142,8 @@ static int verify_node(struct radix_tree_node *slot, unsigned int tag,
int i;
int j;
+ slot = indirect_to_ptr(slot);
+
/* Verify consistency at this level */
for (i = 0; i < RADIX_TREE_TAG_LONGS; i++) {
if (slot->tags[tag][i]) {
@@ -184,8 +186,7 @@ void verify_tag_consistency(struct radix_tree_root *root, unsigned int tag)
{
if (!root->height)
return;
- verify_node(indirect_to_ptr(root->rnode),
- tag, root->height, !!root_tag_get(root, tag));
+ verify_node(root->rnode, tag, root->height, !!root_tag_get(root, tag));
}
void item_kill_tree(struct radix_tree_root *root)