Skip to content

Commit 60ebf32

Browse files
Suzuki K. Pouloseacmel
authored andcommitted
perf tools: Fix intlist node removal
Similar to the one in : https://lkml.org/lkml/2012/8/29/27 Make sure we remove the node from the rblist before we delete the node. The rblist__remove_node() will invoke rblist->node_delete, which will take care of deleting the node with the suitable function provided by the user. Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com> Acked-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Suzuki K Poulose <suzuki@in.ibm.com> Link: http://lkml.kernel.org/r/20120831065840.5167.90318.stgit@suzukikp.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 09a2f16 commit 60ebf32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tools/perf/util/intlist.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ int intlist__add(struct intlist *ilist, int i)
5252
return rblist__add_node(&ilist->rblist, (void *)((long)i));
5353
}
5454

55-
void intlist__remove(struct intlist *ilist __used, struct int_node *node)
55+
void intlist__remove(struct intlist *ilist, struct int_node *node)
5656
{
57-
int_node__delete(node);
57+
rblist__remove_node(&ilist->rblist, &node->rb_node);
5858
}
5959

6060
struct int_node *intlist__find(struct intlist *ilist, int i)

0 commit comments

Comments
 (0)