mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
perf thread: Allow deletion of a thread with no map groups
It needs to be possible to call thread__delete() on a thread with no map groups. This is needed for a subsequent patch which deletes a thread on the error path before map groups have been attached. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
29ce36121e
commit
9608b84e4d
1 changed files with 4 additions and 2 deletions
|
|
@ -60,8 +60,10 @@ void thread__delete(struct thread *thread)
|
|||
{
|
||||
struct comm *comm, *tmp;
|
||||
|
||||
map_groups__put(thread->mg);
|
||||
thread->mg = NULL;
|
||||
if (thread->mg) {
|
||||
map_groups__put(thread->mg);
|
||||
thread->mg = NULL;
|
||||
}
|
||||
list_for_each_entry_safe(comm, tmp, &thread->comm_list, list) {
|
||||
list_del(&comm->list);
|
||||
comm__free(comm);
|
||||
|
|
|
|||
Loading…
Reference in a new issue