drm/amdgpu: Don't call interval_tree_remove in amdgpu_mn_destroy
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 16 Feb 2016 20:31:30 +0000 (15:31 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Feb 2016 21:10:56 +0000 (16:10 -0500)
rbtree_postorder_for_each_entry_safe can skip over some entries if
the tree is rebalanced in interval_tree_remove. interval_tree_remove
is also redundant when the tree is just about to be freed.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c

index d12dff92f3ca93cd18610865e4488894ce0f0b6d..d7ec9bd6755fc7d4194a441571862ce97ef6bb4b 100644 (file)
@@ -76,7 +76,6 @@ static void amdgpu_mn_destroy(struct work_struct *work)
        hash_del(&rmn->node);
        rbtree_postorder_for_each_entry_safe(node, next_node, &rmn->objects,
                                             it.rb) {
-               interval_tree_remove(&node->it, &rmn->objects);
                list_for_each_entry_safe(bo, next_bo, &node->bos, mn_list) {
                        bo->mn = NULL;
                        list_del_init(&bo->mn_list);