diff options
author | Matthew Wilcox <mawilcox@microsoft.com> | 2017-01-16 17:10:21 -0500 |
---|---|---|
committer | Matthew Wilcox <mawilcox@microsoft.com> | 2017-02-13 21:44:05 -0500 |
commit | d58275bc96ae933b1b3888af80920dd6b020c505 (patch) | |
tree | e1acf252dc43eeb1d65e4f715b0a1d52b1b4af09 /mm | |
parent | 1293d5c5f54d5118fbb34fc94e01ba02fcd25fc1 (diff) | |
download | op-kernel-dev-d58275bc96ae933b1b3888af80920dd6b020c505.zip op-kernel-dev-d58275bc96ae933b1b3888af80920dd6b020c505.tar.gz |
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 'mm')
-rw-r--r-- | mm/workingset.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/workingset.c b/mm/workingset.c index abb58ff..80c913c 100644 --- a/mm/workingset.c +++ b/mm/workingset.c @@ -354,10 +354,8 @@ void workingset_update_node(struct radix_tree_node *node, void *private) * as node->private_list is protected by &mapping->tree_lock. */ if (node->count && node->count == node->exceptional) { - if (list_empty(&node->private_list)) { - node->private_data = mapping; + if (list_empty(&node->private_list)) list_lru_add(&shadow_nodes, &node->private_list); - } } else { if (!list_empty(&node->private_list)) list_lru_del(&shadow_nodes, &node->private_list); @@ -435,7 +433,7 @@ static enum lru_status shadow_lru_isolate(struct list_head *item, */ node = container_of(item, struct radix_tree_node, private_list); - mapping = node->private_data; + mapping = container_of(node->root, struct address_space, page_tree); /* Coming from the list, invert the lock order */ if (!spin_trylock(&mapping->tree_lock)) { |