Chris Wilson 338f1d9d1b lib/rbtree,drm/mm: add rbtree_replace_node_cached()
Add a variant of rbtree_replace_node() that maintains the leftmost cache
of struct rbtree_root_cached when replacing nodes within the rbtree.

As drm_mm is the only rb_replace_node() being used on an interval tree,
the mistake looks fairly self-contained.  Furthermore the only user of
drm_mm_replace_node() is its testsuite...

Testcase: igt/drm_mm/replace

Link: http://lkml.kernel.org/r/20171122100729.3742-1-chris@chris-wilson.co.uk
Link: https://patchwork.freedesktop.org/patch/msgid/20171109212435.9265-1-chris@chris-wilson.co.uk
Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-12-14 16:00:48 -08:00
..
2017-08-15 09:02:08 -07:00
2017-12-01 13:09:40 -08:00
2017-12-01 13:09:40 -08:00
2015-11-23 09:44:58 +01:00
2017-12-01 13:09:40 -08:00
2017-10-07 10:45:14 -06:00
2017-02-24 17:46:57 -08:00
2017-11-17 16:10:01 -08:00
2017-12-01 13:09:40 -08:00
2017-12-01 13:09:40 -08:00
2016-12-06 10:17:03 +02:00
2015-09-08 14:35:59 -07:00
2017-09-19 15:18:33 -07:00
2016-08-02 17:31:41 -04:00
2017-12-01 13:09:40 -08:00
2017-08-15 09:02:07 -07:00