aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_workqueue.c')
-rw-r--r--kernel/trace/trace_workqueue.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c
index cfe56d31d85b..128b64b93f14 100644
--- a/kernel/trace/trace_workqueue.c
+++ b/kernel/trace/trace_workqueue.c
@@ -47,12 +47,11 @@ probe_workqueue_insertion(struct task_struct *wq_thread,
47 struct work_struct *work) 47 struct work_struct *work)
48{ 48{
49 int cpu = cpumask_first(&wq_thread->cpus_allowed); 49 int cpu = cpumask_first(&wq_thread->cpus_allowed);
50 struct cpu_workqueue_stats *node, *next; 50 struct cpu_workqueue_stats *node;
51 unsigned long flags; 51 unsigned long flags;
52 52
53 spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags); 53 spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags);
54 list_for_each_entry_safe(node, next, &workqueue_cpu_stat(cpu)->list, 54 list_for_each_entry(node, &workqueue_cpu_stat(cpu)->list, list) {
55 list) {
56 if (node->pid == wq_thread->pid) { 55 if (node->pid == wq_thread->pid) {
57 atomic_inc(&node->inserted); 56 atomic_inc(&node->inserted);
58 goto found; 57 goto found;
@@ -69,12 +68,11 @@ probe_workqueue_execution(struct task_struct *wq_thread,
69 struct work_struct *work) 68 struct work_struct *work)
70{ 69{
71 int cpu = cpumask_first(&wq_thread->cpus_allowed); 70 int cpu = cpumask_first(&wq_thread->cpus_allowed);
72 struct cpu_workqueue_stats *node, *next; 71 struct cpu_workqueue_stats *node;
73 unsigned long flags; 72 unsigned long flags;
74 73
75 spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags); 74 spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags);
76 list_for_each_entry_safe(node, next, &workqueue_cpu_stat(cpu)->list, 75 list_for_each_entry(node, &workqueue_cpu_stat(cpu)->list, list) {
77 list) {
78 if (node->pid == wq_thread->pid) { 76 if (node->pid == wq_thread->pid) {
79 node->executed++; 77 node->executed++;
80 goto found; 78 goto found;