summaryrefslogtreecommitdiff
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-06-26 00:25:56 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 09:58:26 -0700
commit13b41b09491e5d75e8027dca1ee78f5e073bc4c0 (patch)
tree3f08183a4f59075fc3015165183b8ef17cb562a6 /fs/proc/base.c
parent99f895518368252ba862cc15ce4eb98ebbe1bec6 (diff)
downloadlinux-3.10-13b41b09491e5d75e8027dca1ee78f5e073bc4c0.tar.gz
linux-3.10-13b41b09491e5d75e8027dca1ee78f5e073bc4c0.tar.bz2
linux-3.10-13b41b09491e5d75e8027dca1ee78f5e073bc4c0.zip
[PATCH] proc: Use struct pid not struct task_ref
Incrementally update my proc-dont-lock-task_structs-indefinitely patches so that they work with struct pid instead of struct task_ref. Mostly this is a straight 1-1 substitution. 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/base.c')
-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 489810abc72..c7f85544157 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -951,7 +951,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
if (!capable(CAP_AUDIT_CONTROL))
return -EPERM;
- if (current != proc_tref(inode)->task)
+ if (current != pid_task(proc_pid(inode), PIDTYPE_PID))
return -EPERM;
if (count >= PAGE_SIZE)
@@ -1363,8 +1363,8 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
/*
* grab the reference to task.
*/
- ei->tref = tref_get_by_task(task);
- if (!tref_task(ei->tref))
+ ei->pid = get_pid(task->pids[PIDTYPE_PID].pid);
+ if (!ei->pid)
goto out_unlock;
inode->i_uid = 0;
@@ -1482,7 +1482,7 @@ static int pid_delete_dentry(struct dentry * dentry)
* If so, then don't put the dentry on the lru list,
* kill it immediately.
*/
- return !proc_tref(dentry->d_inode)->task;
+ return !proc_pid(dentry->d_inode)->tasks[PIDTYPE_PID].first;
}
static struct dentry_operations tid_fd_dentry_operations =