]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/array.c
[PATCH] proc: Make the generation of the self symlink table driven
[linux-2.6-omap-h63xx.git] / fs / proc / array.c
index 7a76ad5702302e7e975d9cd49ce64fdec9daf6c4..c0e554971df01dbac80e057bde18b94e6648faa9 100644 (file)
@@ -52,7 +52,6 @@
  *                      :  base.c too.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/time.h>
@@ -75,6 +74,7 @@
 #include <linux/times.h>
 #include <linux/cpuset.h>
 #include <linux/rcupdate.h>
+#include <linux/delayacct.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -347,6 +347,8 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
        sigemptyset(&sigign);
        sigemptyset(&sigcatch);
        cutime = cstime = utime = stime = cputime_zero;
+
+       mutex_lock(&tty_mutex);
        read_lock(&tasklist_lock);
        if (task->sighand) {
                spin_lock_irq(&task->sighand->siglock);
@@ -388,6 +390,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
        }
        ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0;
        read_unlock(&tasklist_lock);
+       mutex_unlock(&tty_mutex);
 
        if (!whole || num_threads<2)
                wchan = get_wchan(task);
@@ -412,7 +415,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
 
        res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu %llu\n",
                task->pid,
                tcomm,
                state,
@@ -456,7 +459,8 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
                task->exit_signal,
                task_cpu(task),
                task->rt_priority,
-               task->policy);
+               task->policy,
+               (unsigned long long)delayacct_blkio_ticks(task));
        if(mm)
                mmput(mm);
        return res;