From: Eric W. Biederman Date: Mon, 2 Oct 2006 09:18:55 +0000 (-0700) Subject: [PATCH] proc: properly compute TGID_OFFSET X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8e95bd936df2d3fc0e773068aa34350306a5c52a;p=linux-beck.git [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 --- 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)