diff options
author | Dave Airlie <airlied@redhat.com> | 2017-12-19 12:37:24 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-12-19 12:37:24 +0100 |
commit | 6b7dcb536e3535444c39286333f10d06d2f44fb5 (patch) | |
tree | 6a4c1e30e5900626e506d46b100d21a2fcd59003 /drivers/gpu/drm/drm_mm.c | |
parent | Merge tag 'drm-misc-next-2017-12-14' of git://anongit.freedesktop.org/drm/drm... (diff) | |
parent | Linux 4.15-rc4 (diff) | |
download | linux-6b7dcb536e3535444c39286333f10d06d2f44fb5.tar.xz linux-6b7dcb536e3535444c39286333f10d06d2f44fb5.zip |
BackMerge tag 'v4.15-rc4' into drm-next
Linux 4.15-rc4
Daniel requested it to fix some messy conflicts.
Diffstat (limited to 'drivers/gpu/drm/drm_mm.c')
-rw-r--r-- | drivers/gpu/drm/drm_mm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index eb86bc3f753b..186c4e90cc1c 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c @@ -575,21 +575,23 @@ EXPORT_SYMBOL(drm_mm_remove_node); */ void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new) { + struct drm_mm *mm = old->mm; + DRM_MM_BUG_ON(!old->allocated); *new = *old; list_replace(&old->node_list, &new->node_list); - rb_replace_node(&old->rb, &new->rb, &old->mm->interval_tree.rb_root); + rb_replace_node_cached(&old->rb, &new->rb, &mm->interval_tree); if (drm_mm_hole_follows(old)) { list_replace(&old->hole_stack, &new->hole_stack); rb_replace_node(&old->rb_hole_size, &new->rb_hole_size, - &old->mm->holes_size); + &mm->holes_size); rb_replace_node(&old->rb_hole_addr, &new->rb_hole_addr, - &old->mm->holes_addr); + &mm->holes_addr); } old->allocated = false; |