• Matthew Wilcox's avatar
    radix-tree: tidy up next_chunk · 8c1244de
    Matthew Wilcox authored
    Convert radix_tree_next_chunk to use 'child' instead of 'slot' as the
    name of the child node.  Also use node_maxindex() where it makes sense.
    
    The 'rnode' variable was unnecessary; it doesn't overlap in usage with
    'node', so we can just use 'node' the whole way through the function.
    
    Improve the testcase to start the walk from every index in the carefully
    constructed tree, and to accept any index within the range covered by
    the entry.
    Signed-off-by: default avatarMatthew 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    8c1244de
radix-tree.c 42.8 KB