lib/rbtree.c: fix typo in comment of __rb_insert()

In case 1, it passes down the BLACK color from G to p and u, and maintains
the color of n.  By doing so, it maintains the black height of the
sub-tree.

While in the comment, it marks the color of n to BLACK.  This is a typo
and not consistents with the code.

This patch fixs this typo in comment.

Signed-off-by: Wei Yang <[email protected]>
Acked-by: Michel Lespinasse <[email protected]>
Cc: Xiao Guangrong <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Wei Yang 2014-08-08 14:22:14 -07:00 • committed by Linus Torvalds
commit 1b9c53e849

View file

@ -101,7 +101,7 @@ __rb_insert(struct rb_node *node, struct rb_root *root,
* / \ / \
* p u --> P U
* / /
* n N
* n n
*
* However, since g's parent might be red, and
* 4) does not allow this, we need to recurse