Michel Lespinasse ea5272f5c9 rbtree: fix incorrect rbtree node insertion in fs/proc/proc_sysctl.c
The recently added code to use rbtrees in sysctl did not follow the proper
rbtree interface on insertion - it was calling rb_link_node() which
inserts a new node into the binary tree, but missed the call to
rb_insert_color() which properly balances the rbtree and establishes all
expected rbtree invariants.

I found out about this only because faulty commit also used
rb_init_node(), which I am removing within this patchset.  But I think
it's an easy mistake to make, and it makes me wonder if we should change
the rbtree API so that insertions would be done with a single rb_insert()
call (even if its implementation could still inline the rb_link_node()
part and call a private __rb_insert_color function to do the rebalancing).

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Daniel Santos <daniel.santos@pobox.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:32 +09:00
..
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-07-14 16:38:34 +04:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:12 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:08 +09:00
2012-10-03 08:48:21 -07:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:31 +09:00
2012-07-14 16:34:47 +04:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-09-07 14:57:46 -04:00
2012-07-14 16:34:47 +04:00
2012-03-20 21:29:46 -04:00
2012-03-20 21:29:46 -04:00
2012-10-09 06:53:20 +09:00
2012-09-26 22:20:20 -04:00
2012-09-26 21:10:06 -04:00
2012-07-14 16:32:47 +04:00
2012-07-14 16:32:48 +04:00
2012-09-22 20:48:18 -04:00
2012-09-26 21:08:52 -04:00
2012-10-06 03:04:56 +09:00