mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
radix-tree: fix deleting a multi-order entry through an alias
If we deleted an entry through an index which looked up a sibling pointer, we'd end up zeroing out the wrong slots in the node. Use get_slot_offset() to find the right slot. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Kirill Shutemov <[email protected]> Cc: Jan Kara <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3b8c00f684
commit
29e0967c2f
1 changed files with 1 additions and 1 deletions
|
|
@ -1558,7 +1558,7 @@ void *radix_tree_delete_item(struct radix_tree_root *root,
|
|||
return entry;
|
||||
}
|
||||
|
||||
offset = index & RADIX_TREE_MAP_MASK;
|
||||
offset = get_slot_offset(node, slot);
|
||||
|
||||
/*
|
||||
* Clear all tags associated with the item to be deleted.
|
||||
|
|
|
|||
Loading…
Reference in a new issue