diff options
author | Suzuki K. Poulose <suzuki@in.ibm.com> | 2012-08-31 02:58:47 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-09-05 16:35:24 -0400 |
commit | 60ebf328762914b80d3e4e5f07bda599043c8eda (patch) | |
tree | 1ea52103b55a48d5779af0ed081d21a544e4a01f /tools/perf/util/intlist.c | |
parent | 09a2f16a916178489fc4bf439de668d81fda7616 (diff) |
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>
Diffstat (limited to 'tools/perf/util/intlist.c')
-rw-r--r-- | tools/perf/util/intlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/intlist.c b/tools/perf/util/intlist.c index fd530dced9cb..77c504ff0088 100644 --- a/tools/perf/util/intlist.c +++ b/tools/perf/util/intlist.c | |||
@@ -52,9 +52,9 @@ int intlist__add(struct intlist *ilist, int i) | |||
52 | return rblist__add_node(&ilist->rblist, (void *)((long)i)); | 52 | return rblist__add_node(&ilist->rblist, (void *)((long)i)); |
53 | } | 53 | } |
54 | 54 | ||
55 | void intlist__remove(struct intlist *ilist __used, struct int_node *node) | 55 | void intlist__remove(struct intlist *ilist, struct int_node *node) |
56 | { | 56 | { |
57 | int_node__delete(node); | 57 | rblist__remove_node(&ilist->rblist, &node->rb_node); |
58 | } | 58 | } |
59 | 59 | ||
60 | struct int_node *intlist__find(struct intlist *ilist, int i) | 60 | struct int_node *intlist__find(struct intlist *ilist, int i) |