/* This function returns the first node (in sort order) of the tree.  */
struct rb_node* rb_first(struct rb_root *root)
/* This function returns the first node (in sort order) of the tree.  */
struct rb_node* rb_first(struct rb_root *root)
{
	struct rb_node	*n;
	n = root->rb_node;
	if (!n)
		return NULL;
	while (n->rb_left)
		n = n->rb_left;
	return n;
}