提交 88f21d81 编写于 作者: S Sukadev Bhattiprolu 提交者: Linus Torvalds

pid namespaces: rename child_reaper() function

Rename the child_reaper() function to task_child_reaper() to be similar to
other task_* functions and to distinguish the function from 'struct
pid_namspace.child_reaper'.
Signed-off-by: NSukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Pavel Emelianov <xemul@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Herbert Poetzel <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2894d650
...@@ -775,7 +775,7 @@ static int de_thread(struct task_struct *tsk) ...@@ -775,7 +775,7 @@ static int de_thread(struct task_struct *tsk)
* Reparenting needs write_lock on tasklist_lock, * Reparenting needs write_lock on tasklist_lock,
* so it is safe to do it under read_lock. * so it is safe to do it under read_lock.
*/ */
if (unlikely(tsk->group_leader == child_reaper(tsk))) if (unlikely(tsk->group_leader == task_child_reaper(tsk)))
task_active_pid_ns(tsk)->child_reaper = tsk; task_active_pid_ns(tsk)->child_reaper = tsk;
zap_other_threads(tsk); zap_other_threads(tsk);
......
...@@ -44,7 +44,7 @@ static inline struct pid_namespace *task_active_pid_ns(struct task_struct *tsk) ...@@ -44,7 +44,7 @@ static inline struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
return tsk->nsproxy->pid_ns; return tsk->nsproxy->pid_ns;
} }
static inline struct task_struct *child_reaper(struct task_struct *tsk) static inline struct task_struct *task_child_reaper(struct task_struct *tsk)
{ {
return init_pid_ns.child_reaper; return init_pid_ns.child_reaper;
} }
......
...@@ -674,7 +674,7 @@ forget_original_parent(struct task_struct *father, struct list_head *to_release) ...@@ -674,7 +674,7 @@ forget_original_parent(struct task_struct *father, struct list_head *to_release)
do { do {
reaper = next_thread(reaper); reaper = next_thread(reaper);
if (reaper == father) { if (reaper == father) {
reaper = child_reaper(father); reaper = task_child_reaper(father);
break; break;
} }
} while (reaper->exit_state); } while (reaper->exit_state);
...@@ -874,7 +874,7 @@ static inline void check_stack_usage(void) {} ...@@ -874,7 +874,7 @@ static inline void check_stack_usage(void) {}
static inline void exit_child_reaper(struct task_struct *tsk) static inline void exit_child_reaper(struct task_struct *tsk)
{ {
if (likely(tsk->group_leader != child_reaper(tsk))) if (likely(tsk->group_leader != task_child_reaper(tsk)))
return; return;
panic("Attempted to kill init!"); panic("Attempted to kill init!");
......
...@@ -1839,7 +1839,7 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, ...@@ -1839,7 +1839,7 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
* within that pid space. It can of course get signals from * within that pid space. It can of course get signals from
* its parent pid space. * its parent pid space.
*/ */
if (current == child_reaper(current)) if (current == task_child_reaper(current))
continue; continue;
if (sig_kernel_stop(signr)) { if (sig_kernel_stop(signr)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册