aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-06-26 00:25:51 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 09:58:25 -0700
commitde7587343bfebc186995ad294e3de0da382eb9bc (patch)
treedb5d696d19c8255bd58929516be79409743c6081 /fs/proc
parent[PATCH] proc: Remove tasklist_lock from proc_pid_readdir (diff)
downloadlinux-dev-de7587343bfebc186995ad294e3de0da382eb9bc.tar.xz
linux-dev-de7587343bfebc186995ad294e3de0da382eb9bc.zip
[PATCH] proc: Remove tasklist_lock from proc_pid_lookup() and proc_task_lookup()
Since we no longer need the tasklist_lock for get_task_struct the lookup methods no longer need the tasklist_lock. This just depends on my previous patch that makes get_task_struct() rcu safe. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index cc578a300a2b..8180579f8792 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1940,11 +1940,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
if (tgid == ~0U)
goto out;
- read_lock(&tasklist_lock);
+ rcu_read_lock();
task = find_task_by_pid(tgid);
if (task)
get_task_struct(task);
- read_unlock(&tasklist_lock);
+ rcu_read_unlock();
if (!task)
goto out;
@@ -1988,11 +1988,11 @@ static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry
if (tid == ~0U)
goto out;
- read_lock(&tasklist_lock);
+ rcu_read_lock();
task = find_task_by_pid(tid);
if (task)
get_task_struct(task);
- read_unlock(&tasklist_lock);
+ rcu_read_unlock();
if (!task)
goto out;
if (leader->tgid != task->tgid)