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 `sr` with `Sr`. The condition `!tmp1 || rb_is_black(tmp1)`
ensures that `tmp1` (which is `sibling->rb_right`) is either NULL or a
black node. Therefore, the right child of the sibling must be black, and
the example should use `Sr` instead of `sr`.

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

authored by

Chisheng Chen and committed by
Andrew Morton
3dfd79cc db80bd2c

+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);