Merge tag 'v3.18' into p/abusse/merge_upgrade
[projects/modsched/linux.git] / kernel / sched / cfs / debug.c
index 627b3c3..ce33780 100644 (file)
@@ -150,7 +150,6 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
 static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
 {
        struct task_struct *g, *p;
-       unsigned long flags;
 
        SEQ_printf(m,
        "\nrunnable tasks:\n"
@@ -159,16 +158,14 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
        "------------------------------------------------------"
        "----------------------------------------------------\n");
 
-       read_lock_irqsave(&tasklist_lock, flags);
-
-       do_each_thread(g, p) {
+       rcu_read_lock();
+       for_each_process_thread(g, p) {
                if (task_cpu(p) != rq_cpu)
                        continue;
 
                print_task(m, rq, p);
-       } while_each_thread(g, p);
-
-       read_unlock_irqrestore(&tasklist_lock, flags);
+       }
+       rcu_read_unlock();
 }
 
 void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
@@ -333,9 +330,7 @@ do {                                                                        \
        print_cfs_stats(m, cpu);
        print_rt_stats(m, cpu);
 
-       rcu_read_lock();
        print_rq(m, rq, cpu);
-       rcu_read_unlock();
        spin_unlock_irqrestore(&sched_debug_lock, flags);
        SEQ_printf(m, "\n");
 }