]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/array.c
[PATCH] struct path: convert ufs
[linux-2.6-omap-h63xx.git] / fs / proc / array.c
index 25e917fb47399bf22761fb8ed47b190776ee6cff..b0cd014a39bd7267707f95a264fe24a82b0eec08 100644 (file)
@@ -346,20 +346,13 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
        sigemptyset(&sigcatch);
        cutime = cstime = utime = stime = cputime_zero;
 
-       mutex_lock(&tty_mutex);
        rcu_read_lock();
        if (lock_task_sighand(task, &flags)) {
                struct signal_struct *sig = task->signal;
-               struct tty_struct *tty = sig->tty;
-
-               if (tty) {
-                       /*
-                        * sig->tty is not stable, but tty_mutex
-                        * protects us from release_dev(tty)
-                        */
-                       barrier();
-                       tty_pgrp = tty->pgrp;
-                       tty_nr = new_encode_dev(tty_devnum(tty));
+
+               if (sig->tty) {
+                       tty_pgrp = sig->tty->pgrp;
+                       tty_nr = new_encode_dev(tty_devnum(sig->tty));
                }
 
                num_threads = atomic_read(&sig->count);
@@ -395,7 +388,6 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
                unlock_task_sighand(task, &flags);
        }
        rcu_read_unlock();
-       mutex_unlock(&tty_mutex);
 
        if (!whole || num_threads<2)
                wchan = get_wchan(task);