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>
This commit is contained in:

committed by
Linus Torvalds

parent
1366c37ed8
commit
339e635304
@@ -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)
|
||||
|
Reference in New Issue
Block a user