Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/rbtree: set successor's parent unconditionally
Both in Case 2 and 3, we exchange n and s. This mean no matter whether child2 is NULL or not, successor's parent should be assigned to node's. This patch takes this step out to make it explicit and reduce the ambiguity. Besides, this step reduces some symbol size like rb_erase(). KERN_CONFIG upstream patched OPT_FOR_PERF 877 870 OPT_FOR_SIZE 635 621 Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Wei Yang <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Michel Lespinasse <[email protected]> Reviewed-by: Davidlohr Bueso <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information