Wolfram Strepp 55a63998b8 lib/rbtree.c: optimize rb_erase()
Tfour 4 redundant if-conditions in function __rb_erase_color() in
lib/rbtree.c are removed.

In pseudo-source-code, the structure of the code is as follows:

if ((!A || B) && (!C || D)) {
	.
	.
	.
} else {
	if (!C || D) {//if this is true, it implies: (A == true) && (B == false)
		if (A) {//hence this always evaluates to 'true'...
			.
		}
		.
		//at this point, C always becomes true, because of:
		__rb_rotate_right/left();
		//and:
		other = parent->rb_right/left;
	}
	.
	.
	if (C) {//...and this too !
		.
	}
}

Signed-off-by: Wolfram Strepp <wstrepp@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <andrea@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-01 08:59:17 -07:00
..
2008-07-25 10:53:26 -07:00
2008-07-24 10:47:33 -07:00
2008-06-06 11:29:10 -07:00
2009-01-06 15:59:11 -08:00
2009-01-01 10:12:19 +10:30
2008-07-26 12:00:07 -07:00
2009-04-01 08:59:13 -07:00
2009-02-11 13:38:00 +11:00
2009-03-28 23:05:50 +01:00
2008-07-26 12:00:07 -07:00
2008-07-30 16:29:19 -07:00
2009-04-01 08:59:17 -07:00
2008-07-26 12:00:10 -07:00
2009-01-11 04:54:34 +01:00
2008-07-26 12:00:10 -07:00
2008-07-22 19:24:31 +10:00
2009-01-06 15:59:12 -08:00