diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-12-23 23:36:43 +0100 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-12-23 23:36:43 +0100 |
commit | 7f8947aab5916e788950c0d99cc61e3f3ea0697f (patch) | |
tree | 33c77ab5fb6c5b756fb348ba3073f2b29d7fd464 /lib | |
parent | 37b3fd06038fc29d476ce06a2ebda4f8b90be3d3 (diff) |
rbtree: don't include the rcu header
The RCU header pulls in spinlock.h and fails due not yet defined types:
|In file included from include/linux/spinlock.h:275:0,
| from include/linux/rcupdate.h:38,
| from include/linux/rbtree.h:34,
| from include/linux/rtmutex.h:17,
| from include/linux/spinlock_types.h:18,
| from kernel/bounds.c:13:
|include/linux/rwlock_rt.h:16:38: error: unknown type name ‘rwlock_t’
| extern void __lockfunc rt_write_lock(rwlock_t *rwlock);
| ^
This patch moves the only RCU user from the header file into c file so the
inclusion can be avoided.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbtree.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rbtree.c b/lib/rbtree.c index 1356454e36de..d15d6c4327f1 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c @@ -23,6 +23,7 @@ #include <linux/rbtree_augmented.h> #include <linux/export.h> +#include <linux/rcupdate.h> /* * red-black trees properties: http://en.wikipedia.org/wiki/Rbtree @@ -590,3 +591,13 @@ struct rb_node *rb_first_postorder(const struct rb_root *root) return rb_left_deepest_node(root->rb_node); } EXPORT_SYMBOL(rb_first_postorder); + +void rb_link_node_rcu(struct rb_node *node, struct rb_node *parent, + struct rb_node **rb_link) +{ + node->__rb_parent_color = (unsigned long)parent; + node->rb_left = node->rb_right = NULL; + + rcu_assign_pointer(*rb_link, node); +} +EXPORT_SYMBOL(rb_link_node_rcu); |