git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
lib
/
rbtree.c
diff --git
a/lib/rbtree.c
b/lib/rbtree.c
index
621552c
..
14b791a
100644
(file)
--- a/
lib/rbtree.c
+++ b/
lib/rbtree.c
@@
-312,6
+312,19
@@
struct rb_node *rb_first(struct rb_root *root)
}
EXPORT_SYMBOL(rb_first);
}
EXPORT_SYMBOL(rb_first);
+struct rb_node *rb_last(struct rb_root *root)
+{
+ struct rb_node *n;
+
+ n = root->rb_node;
+ if (!n)
+ return NULL;
+ while (n->rb_right)
+ n = n->rb_right;
+ return n;
+}
+EXPORT_SYMBOL(rb_last);
+
struct rb_node *rb_next(struct rb_node *node)
{
/* If we have a right-hand child, go down and then left as far
struct rb_node *rb_next(struct rb_node *node)
{
/* If we have a right-hand child, go down and then left as far