path: root/tools/testing/radix-tree/multiorder.c
diff options
authorMatthew Wilcox <>2016-05-20 17:02:11 -0700
committerLinus Torvalds <>2016-05-20 17:58:30 -0700
commit49ea6ebcd3080ebf2c589b5f1437dd8bb2f90395 (patch)
treea6a7659f076d68efeeafa8fcd5c8f4d1ae731474 /tools/testing/radix-tree/multiorder.c
parent1456a439fc2dcc0c3d1a2d7af1fd83962813aaee (diff)
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 <> Reviewed-by: Ross Zwisler <> Cc: Konstantin Khlebnikov <> Cc: Kirill Shutemov <> Cc: Jan Kara <> Cc: Neil Brown <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'tools/testing/radix-tree/multiorder.c')
0 files changed, 0 insertions, 0 deletions