Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/rbtree.c: fix the example typo

Replace the "Sr" with "sr", the example is wrong if sl and N don't have
child nodes, so sr should be red node.

Link: https://lkml.kernel.org/r/20240628142229.69419-1-zxcvb600870024@gmail.com
Signed-off-by: Hsin Chang Yu <zxcvb600870024@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Hsin Chang Yu and committed by
Andrew Morton
cedb08ca 255547c6

+4 -4
+4 -4
lib/rbtree.c
··· 297 297 * / \ / \ 298 298 * N S --> N sl 299 299 * / \ \ 300 - * sl Sr S 300 + * sl sr S 301 301 * \ 302 - * Sr 302 + * sr 303 303 * 304 304 * Note: p might be red, and then both 305 305 * p and sl are red after rotation(which ··· 312 312 * / \ / \ 313 313 * N sl --> P S 314 314 * \ / \ 315 - * S N Sr 315 + * S N sr 316 316 * \ 317 - * Sr 317 + * sr 318 318 */ 319 319 tmp1 = tmp2->rb_right; 320 320 WRITE_ONCE(sibling->rb_left, tmp1);