]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - lib/radix-tree.c
radix-tree: tidy up __radix_tree_create()
authorMatthew Wilcox <willy@linux.intel.com>
Sat, 21 May 2016 00:03:42 +0000 (17:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
commit89148aa40201def3fa552f9d07dd99740d880ab2
treea9a3dcaa1c309890ab202d435d131b433ef0a6c9
parenta8e4da25d3c573a0c3cf2fb33e91ec5cad8d7f16
radix-tree: tidy up __radix_tree_create()

1. Rename the existing variable 'slot' to 'child'.
2. Introduce a new variable called 'slot' which is the address of the
   slot we're dealing with.  This lets us simplify the tree insertion,
   and removes the recalculation of 'slot' at the end of the function.
3. Using 'slot' in the sibling pointer insertion part makes the code
   more readable.

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>
lib/radix-tree.c