rbtree: place easiest case first in rb_erase()
authorMichel Lespinasse <walken@google.com>
Mon, 8 Oct 2012 23:31:10 +0000 (16:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Oct 2012 07:22:36 +0000 (16:22 +0900)
commit60670b8034d6e2ba860af79c9379b7788d09db73
tree5fed30a98d29a03c078f756275ba34c830fee36c
parent7abc704ae399fcb9c51ca200b0456f8a975a8011
rbtree: place easiest case first in rb_erase()

In rb_erase, move the easy case (node to erase has no more than
1 child) first. I feel the code reads easier that way.

Signed-off-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/rbtree.c