aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-10-19 02:40:43 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:43 -0400
commit457c25107b83bc6456b3a18a25511418dc25da69 (patch)
tree608586f887981c72d5bdf2ca1c390dbd624b4456 /fs
parent19c5870c0eefd27c6d09d867465e0571262e05d0 (diff)
Remove unused variables from fs/proc/base.c
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 <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/base.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 54c2e5621afb..39a3d7c969c5 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1519,7 +1519,7 @@ static int proc_readfd_common(struct file * filp, void * dirent,
1519 struct dentry *dentry = filp->f_path.dentry; 1519 struct dentry *dentry = filp->f_path.dentry;
1520 struct inode *inode = dentry->d_inode; 1520 struct inode *inode = dentry->d_inode;
1521 struct task_struct *p = get_proc_task(inode); 1521 struct task_struct *p = get_proc_task(inode);
1522 unsigned int fd, tid, ino; 1522 unsigned int fd, ino;
1523 int retval; 1523 int retval;
1524 struct files_struct * files; 1524 struct files_struct * files;
1525 struct fdtable *fdt; 1525 struct fdtable *fdt;
@@ -1528,7 +1528,6 @@ static int proc_readfd_common(struct file * filp, void * dirent,
1528 if (!p) 1528 if (!p)
1529 goto out_no_task; 1529 goto out_no_task;
1530 retval = 0; 1530 retval = 0;
1531 tid = p->pid;
1532 1531
1533 fd = filp->f_pos; 1532 fd = filp->f_pos;
1534 switch (fd) { 1533 switch (fd) {
@@ -1763,7 +1762,6 @@ static int proc_pident_readdir(struct file *filp,
1763 const struct pid_entry *ents, unsigned int nents) 1762 const struct pid_entry *ents, unsigned int nents)
1764{ 1763{
1765 int i; 1764 int i;
1766 int pid;
1767 struct dentry *dentry = filp->f_path.dentry; 1765 struct dentry *dentry = filp->f_path.dentry;
1768 struct inode *inode = dentry->d_inode; 1766 struct inode *inode = dentry->d_inode;
1769 struct task_struct *task = get_proc_task(inode); 1767 struct task_struct *task = get_proc_task(inode);
@@ -1776,7 +1774,6 @@ static int proc_pident_readdir(struct file *filp,
1776 goto out_no_task; 1774 goto out_no_task;
1777 1775
1778 ret = 0; 1776 ret = 0;
1779 pid = task->pid;
1780 i = filp->f_pos; 1777 i = filp->f_pos;
1781 switch (i) { 1778 switch (i) {
1782 case 0: 1779 case 0: