summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Wilcox <mawilcox@microsoft.com>2017-01-16 17:10:21 -0500
committerMatthew Wilcox <mawilcox@microsoft.com>2017-02-13 21:44:05 -0500
commitd58275bc96ae933b1b3888af80920dd6b020c505 (patch)
treee1acf252dc43eeb1d65e4f715b0a1d52b1b4af09 /include
parent1293d5c5f54d5118fbb34fc94e01ba02fcd25fc1 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/radix-tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 2ba0c1f46c84..d250059bbfa4 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -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 */