提交 8e95bd93 编写于 作者: E Eric W. Biederman 提交者: Linus Torvalds

[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: NEric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b0fa9db6
...@@ -1961,7 +1961,7 @@ static struct task_struct *next_tgid(unsigned int tgid) ...@@ -1961,7 +1961,7 @@ static struct task_struct *next_tgid(unsigned int tgid)
return task; 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, static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
struct task_struct *task, int tgid) struct task_struct *task, int tgid)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册