>>> On 21.11.17 at 16:20, <[email protected]> wrote:
> From: Michel Lespinasse <[email protected]>
> 
> In __rb_erase_color(), we were always setting a node to black after
> exiting the main loop.  And in one case, after fixing up the tree to
> satisfy all rbtree invariants, we were setting the current node to root
> just to guarantee a loop exit, at which point the root would be set to
> black.  However this is not necessary, as the root of an rbtree is already
> known to be black.  The only case where the color flip is required is when
> we exit the loop due to the current node being red, and it's easiest to
> just do the flip at that point instead of doing it after the loop.
> 
> [[email protected]: perf tools: fix build for another rbtree.c change]
> Signed-off-by: Michel Lespinasse <[email protected]>
> Cc: Andrea Arcangeli <[email protected]>
> Acked-by: David Woodhouse <[email protected]>
> Cc: Rik van Riel <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: Daniel Santos <[email protected]>
> Cc: Jens Axboe <[email protected]>
> Cc: "Eric W. Biederman" <[email protected]>
> Signed-off-by: Adrian Hunter <[email protected]>
> Cc: Alexander Shishkin <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> Signed-off-by: Linus Torvalds <[email protected]>
> [Linux commit d6ff1273928ebf15466a85b7e1810cd00e72998b]
> 
> Ported only rbtree.c to Xen.
> 
> Signed-off-by: Praveen Kumar <[email protected]>

Acked-by: Jan Beulich <[email protected]>



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to