aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
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 489810abc72d..c7f855441573 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,
951 if (!capable(CAP_AUDIT_CONTROL)) 951 if (!capable(CAP_AUDIT_CONTROL))
952 return -EPERM; 952 return -EPERM;
953 953
954 if (current != proc_tref(inode)->task) 954 if (current != pid_task(proc_pid(inode), PIDTYPE_PID))
955 return -EPERM; 955 return -EPERM;
956 956
957 if (count >= PAGE_SIZE) 957 if (count >= PAGE_SIZE)
@@ -1363,8 +1363,8 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
1363 /* 1363 /*
1364 * grab the reference to task. 1364 * grab the reference to task.
1365 */ 1365 */
1366 ei->tref = tref_get_by_task(task); 1366 ei->pid = get_pid(task->pids[PIDTYPE_PID].pid);
1367 if (!tref_task(ei->tref)) 1367 if (!ei->pid)
1368 goto out_unlock; 1368 goto out_unlock;
1369 1369
1370 inode->i_uid = 0; 1370 inode->i_uid = 0;
@@ -1482,7 +1482,7 @@ static int pid_delete_dentry(struct dentry * dentry)
1482 * If so, then don't put the dentry on the lru list, 1482 * If so, then don't put the dentry on the lru list,
1483 * kill it immediately. 1483 * kill it immediately.
1484 */ 1484 */
1485 return !proc_tref(dentry->d_inode)->task; 1485 return !proc_pid(dentry->d_inode)->tasks[PIDTYPE_PID].first;
1486} 1486}
1487 1487
1488static struct dentry_operations tid_fd_dentry_operations = 1488static struct dentry_operations tid_fd_dentry_operations =