summaryrefslogtreecommitdiffstats
path: root/include/linux/rbtree.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-07-01 07:53:51 +0100
committerDavid Howells <dhowells@redhat.com>2016-07-06 10:51:14 +0100
commitc1adf20052d80f776849fa2c1acb472cdeb7786c (patch)
treee73407fdc52ab77e9666ae7798c8b38b6da1ed09 /include/linux/rbtree.h
parent1291e9d1084506c5cba6313ce809d7516bb5868a (diff)
downloadlinux-stable-c1adf20052d80f776849fa2c1acb472cdeb7786c.tar.gz
linux-stable-c1adf20052d80f776849fa2c1acb472cdeb7786c.tar.bz2
linux-stable-c1adf20052d80f776849fa2c1acb472cdeb7786c.zip
Introduce rb_replace_node_rcu()
Implement an RCU-safe variant of rb_replace_node() and rearrange rb_replace_node() to do things in the same order. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'include/linux/rbtree.h')
-rw-r--r--include/linux/rbtree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index b6900099ea81..e585018498d5 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -76,6 +76,8 @@ extern struct rb_node *rb_next_postorder(const struct rb_node *);
/* Fast replacement of a single node without remove/rebalance/add/rebalance */
extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
struct rb_root *root);
+extern void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new,
+ struct rb_root *root);
static inline void rb_link_node(struct rb_node *node, struct rb_node *parent,
struct rb_node **rb_link)