projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b8c00f
)
radix-tree: fix deleting a multi-order entry through an alias
author
Matthew Wilcox
<
[email protected]
>
Sat, 21 May 2016 00:02:02 +0000
(17:02 -0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 21 May 2016 00:58:30 +0000
(17:58 -0700)
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]
>
lib/radix-tree.c
patch
|
blob
|
history
diff --git
a/lib/radix-tree.c
b/lib/radix-tree.c
index c0366d1d2613e788f07a46f1224fff99d94bef80..b3364b9ecc839208c2226ddd3e32b950c40ea035 100644
(file)
--- a/
lib/radix-tree.c
+++ b/
lib/radix-tree.c
@@
-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.