Skip to content

Commit

Permalink
[PATCH] proc: properly compute TGID_OFFSET
Browse files Browse the repository at this point in the history
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@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Oct 2, 2006
1 parent b0fa9db commit 8e95bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ static struct task_struct *next_tgid(unsigned int tgid)
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)
Expand Down

0 comments on commit 8e95bd9

Please sign in to comment.