[PATCH 1/4] proc: Properly compute TGID_OFFSET

From: Eric W. Biederman
Date: Sat Sep 09 2006 - 23:59:04 EST


The value doesn't change but this ensures I will have the proper
value when other files are added to proc_base_stuff.

Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
---
fs/proc/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 04e29f9..c4fcd64 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1961,7 +1961,7 @@ retry:
return task;
}

-#define TGID_OFFSET (FIRST_PROCESS_ENTRY + (1 /* /proc/self */))
+#define TGID_OFFSET (FIRST_PROCESS_ENTRY + (ARRAY_SIZE(proc_base_stuff) - 1))

static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
struct task_struct *task, int tgid)
--
1.4.2.rc3.g7e18e-dirty

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/