aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-06-26 03:25:51 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:25 -0400
commitde7587343bfebc186995ad294e3de0da382eb9bc (patch)
treedb5d696d19c8255bd58929516be79409743c6081 /fs
parent454cc105ef690f2a0ba7c6b194d55666b4e918ce (diff)
[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')
-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
1940 if (tgid == ~0U) 1940 if (tgid == ~0U)
1941 goto out; 1941 goto out;
1942 1942
1943 read_lock(&tasklist_lock); 1943 rcu_read_lock();
1944 task = find_task_by_pid(tgid); 1944 task = find_task_by_pid(tgid);
1945 if (task) 1945 if (task)
1946 get_task_struct(task); 1946 get_task_struct(task);
1947 read_unlock(&tasklist_lock); 1947 rcu_read_unlock();
1948 if (!task) 1948 if (!task)
1949 goto out; 1949 goto out;
1950 1950
@@ -1988,11 +1988,11 @@ static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry
1988 if (tid == ~0U) 1988 if (tid == ~0U)
1989 goto out; 1989 goto out;
1990 1990
1991 read_lock(&tasklist_lock); 1991 rcu_read_lock();
1992 task = find_task_by_pid(tid); 1992 task = find_task_by_pid(tid);
1993 if (task) 1993 if (task)
1994 get_task_struct(task); 1994 get_task_struct(task);
1995 read_unlock(&tasklist_lock); 1995 rcu_read_unlock();
1996 if (!task) 1996 if (!task)
1997 goto out; 1997 goto out;
1998 if (leader->tgid != task->tgid) 1998 if (leader->tgid != task->tgid)