aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rbtree.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-11 15:15:52 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:26:56 -0400
commit10fd48f2376db52f08bf0420d2c4f580e39269e1 (patch)
tree89de18dcda9c8a09937187a0e8d138cfe3cb4089 /include/linux/rbtree.h
parent9817064b68fef7e4580c6df1ea597e106b9ff88b (diff)
[PATCH] rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev
The conditions got reserved. Also make rb_next() and rb_prev() check for the empty condition. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux/rbtree.h')
-rw-r--r--include/linux/rbtree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index 8d5382e62c08..344bc3495ddb 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -133,7 +133,7 @@ static inline void rb_set_color(struct rb_node *rb, int color)
133#define rb_entry(ptr, type, member) container_of(ptr, type, member) 133#define rb_entry(ptr, type, member) container_of(ptr, type, member)
134 134
135#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) 135#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
136#define RB_EMPTY_NODE(node) (rb_parent(node) != node) 136#define RB_EMPTY_NODE(node) (rb_parent(node) == node)
137#define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) 137#define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
138 138
139extern void rb_insert_color(struct rb_node *, struct rb_root *); 139extern void rb_insert_color(struct rb_node *, struct rb_root *);