radix-tree: Store a pointer to the root in each node
Instead of having this mysterious private_data in each radix_tree_node, store a pointer to the root, which can be useful for debugging. This also relieves the mm code from the duty of updating it. Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
This commit is contained in:
@@ -96,7 +96,7 @@ struct radix_tree_node {
|
||||
unsigned char count; /* Total entry count */
|
||||
unsigned char exceptional; /* Exceptional entry count */
|
||||
struct radix_tree_node *parent; /* Used when ascending tree */
|
||||
void *private_data; /* For tree user */
|
||||
struct radix_tree_root *root; /* The tree we belong to */
|
||||
union {
|
||||
struct list_head private_list; /* For tree user */
|
||||
struct rcu_head rcu_head; /* Used when freeing node */
|
||||
|
Reference in New Issue
Block a user