mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
radix-tree: move rcu_head into a union with private_list
I want to be able to reference node->parent after freeing node. Currently node->parent is in a union with rcu_head, so it is overwritten when the node is put on the RCU list. We know that private_list is not referenced after the node is freed, so it is safe for these two members to share space. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox <[email protected]> Tested-by: Kirill A. Shutemov <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
91b9677c4c
commit
91d9c05ac6
2 changed files with 5 additions and 10 deletions
|
|
@ -325,6 +325,7 @@ static void radix_tree_node_rcu_free(struct rcu_head *head)
|
|||
tag_clear(node, i, 0);
|
||||
|
||||
node->slots[0] = NULL;
|
||||
INIT_LIST_HEAD(&node->private_list);
|
||||
|
||||
kmem_cache_free(radix_tree_node_cachep, node);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue