From 8e95bd936df2d3fc0e773068aa34350306a5c52a Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Mon, 2 Oct 2006 02:18:55 -0700 Subject: [PATCH] proc: properly compute TGID_OFFSET 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 Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/proc') diff --git a/fs/proc/base.c b/fs/proc/base.c index 04e29f929a11..c4fcd6465f73 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) -- cgit v1.2.1