|
@@ -164,7 +164,6 @@ static struct fs_struct *get_fs_struct(struct task_struct *task)
|
|
|
|
|
|
static int get_nr_threads(struct task_struct *tsk)
|
|
|
{
|
|
|
- /* Must be called with the rcu_read_lock held */
|
|
|
unsigned long flags;
|
|
|
int count = 0;
|
|
|
|
|
@@ -471,14 +470,10 @@ static int proc_pid_limits(struct task_struct *task, char *buffer)
|
|
|
|
|
|
struct rlimit rlim[RLIM_NLIMITS];
|
|
|
|
|
|
- rcu_read_lock();
|
|
|
- if (!lock_task_sighand(task,&flags)) {
|
|
|
- rcu_read_unlock();
|
|
|
+ if (!lock_task_sighand(task, &flags))
|
|
|
return 0;
|
|
|
- }
|
|
|
memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS);
|
|
|
unlock_task_sighand(task, &flags);
|
|
|
- rcu_read_unlock();
|
|
|
|
|
|
/*
|
|
|
* print the file header
|
|
@@ -3088,9 +3083,7 @@ static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct
|
|
|
generic_fillattr(inode, stat);
|
|
|
|
|
|
if (p) {
|
|
|
- rcu_read_lock();
|
|
|
stat->nlink += get_nr_threads(p);
|
|
|
- rcu_read_unlock();
|
|
|
put_task_struct(p);
|
|
|
}
|
|
|
|