diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/proc/array.c | 4 | ||||
| -rw-r--r-- | fs/proc/base.c | 12 |
2 files changed, 2 insertions, 14 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 885ab5513ac5..9b58d38bc911 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
| @@ -267,7 +267,7 @@ static inline void task_sig(struct seq_file *m, struct task_struct *p) | |||
| 267 | shpending = p->signal->shared_pending.signal; | 267 | shpending = p->signal->shared_pending.signal; |
| 268 | blocked = p->blocked; | 268 | blocked = p->blocked; |
| 269 | collect_sigign_sigcatch(p, &ignored, &caught); | 269 | collect_sigign_sigcatch(p, &ignored, &caught); |
| 270 | num_threads = atomic_read(&p->signal->count); | 270 | num_threads = get_nr_threads(p); |
| 271 | rcu_read_lock(); /* FIXME: is this correct? */ | 271 | rcu_read_lock(); /* FIXME: is this correct? */ |
| 272 | qsize = atomic_read(&__task_cred(p)->user->sigpending); | 272 | qsize = atomic_read(&__task_cred(p)->user->sigpending); |
| 273 | rcu_read_unlock(); | 273 | rcu_read_unlock(); |
| @@ -410,7 +410,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
| 410 | tty_nr = new_encode_dev(tty_devnum(sig->tty)); | 410 | tty_nr = new_encode_dev(tty_devnum(sig->tty)); |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | num_threads = atomic_read(&sig->count); | 413 | num_threads = get_nr_threads(task); |
| 414 | collect_sigign_sigcatch(task, &sigign, &sigcatch); | 414 | collect_sigign_sigcatch(task, &sigign, &sigcatch); |
| 415 | 415 | ||
| 416 | cmin_flt = sig->cmin_flt; | 416 | cmin_flt = sig->cmin_flt; |
diff --git a/fs/proc/base.c b/fs/proc/base.c index c7f9f23449dc..c384e8b84dff 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -166,18 +166,6 @@ static int get_fs_path(struct task_struct *task, struct path *path, bool root) | |||
| 166 | return result; | 166 | return result; |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | static int get_nr_threads(struct task_struct *tsk) | ||
| 170 | { | ||
| 171 | unsigned long flags; | ||
| 172 | int count = 0; | ||
| 173 | |||
| 174 | if (lock_task_sighand(tsk, &flags)) { | ||
| 175 | count = atomic_read(&tsk->signal->count); | ||
| 176 | unlock_task_sighand(tsk, &flags); | ||
| 177 | } | ||
| 178 | return count; | ||
| 179 | } | ||
| 180 | |||
| 181 | static int proc_cwd_link(struct inode *inode, struct path *path) | 169 | static int proc_cwd_link(struct inode *inode, struct path *path) |
| 182 | { | 170 | { |
| 183 | struct task_struct *task = get_proc_task(inode); | 171 | struct task_struct *task = get_proc_task(inode); |
