From: Pavel Emelyanov When removing the explicit task_struct->pid usage I found that proc_readfd_common() and proc_pident_readdir() get this field, but do not use it at all. So this cleanup is a cheap help with the task_struct->pid isolation. Signed-off-by: Pavel Emelyanov Signed-off-by: Andrew Morton --- fs/proc/base.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff -puN fs/proc/base.c~remove-unused-variables-from-fs-proc-basec fs/proc/base.c --- a/fs/proc/base.c~remove-unused-variables-from-fs-proc-basec +++ a/fs/proc/base.c @@ -1483,7 +1483,7 @@ static int proc_readfd_common(struct fil struct dentry *dentry = filp->f_path.dentry; struct inode *inode = dentry->d_inode; struct task_struct *p = get_proc_task(inode); - unsigned int fd, tid, ino; + unsigned int fd, ino; int retval; struct files_struct * files; struct fdtable *fdt; @@ -1492,7 +1492,6 @@ static int proc_readfd_common(struct fil if (!p) goto out_no_task; retval = 0; - tid = p->pid; fd = filp->f_pos; switch (fd) { @@ -1727,7 +1726,6 @@ static int proc_pident_readdir(struct fi const struct pid_entry *ents, unsigned int nents) { int i; - int pid; struct dentry *dentry = filp->f_path.dentry; struct inode *inode = dentry->d_inode; struct task_struct *task = get_proc_task(inode); @@ -1740,7 +1738,6 @@ static int proc_pident_readdir(struct fi goto out_no_task; ret = 0; - pid = task->pid; i = filp->f_pos; switch (i) { case 0: _