summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2016-05-20 17:02:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-20 17:58:30 -0700
commit49ea6ebcd3080ebf2c589b5f1437dd8bb2f90395 (patch)
treea6a7659f076d68efeeafa8fcd5c8f4d1ae731474 /tools
parent1456a439fc2dcc0c3d1a2d7af1fd83962813aaee (diff)
downloadlinux-49ea6ebcd3080ebf2c589b5f1437dd8bb2f90395.tar.gz
radix-tree: fix extending the tree for multi-order entries at offset 0
The current code will insert entries at each level, as if we're going to add a new entry at the bottom level, so we then get an -EEXIST when we try to insert the entry into the tree. The best way to fix this is to not check 'order' when inserting into an empty tree. We still need to 'extend' the tree to the height necessary for the maximum index corresponding to this entry, so pass that value to radix_tree_extend() rather than the index we're asked to create, or we won't create a tree that's deep enough. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions