All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>,
	Linux Containers <containers@lists.osdl.org>,
	Oleg Nesterov <oleg@tv-sign.ru>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Remove unused variables from fs/proc/base.c
Date: Thu, 23 Aug 2007 19:43:19 +0400	[thread overview]
Message-ID: <46CDAB17.4040105@openvz.org> (raw)

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>

---

 fs/proc/base.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 2fb3dfc..79e1918 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1434,7 +1434,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;
@@ -1443,7 +1443,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) {
@@ -1678,7 +1677,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);
@@ -1691,7 +1689,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:

                 reply	other threads:[~2007-08-23 15:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46CDAB17.4040105@openvz.org \
    --to=xemul@openvz.org \
    --cc=akpm@osdl.org \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=sukadev@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.