kernel/exit.c: fix coding style warnings and errors
Fixed coding style warnings and errors. Signed-off-by: Ionut Alexa <ionut.m.alexa@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
f58d6c7547
Коммит
a0be55dee7
|
@ -192,7 +192,8 @@ repeat:
|
|||
*/
|
||||
zap_leader = 0;
|
||||
leader = p->group_leader;
|
||||
if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) {
|
||||
if (leader != p && thread_group_empty(leader)
|
||||
&& leader->exit_state == EXIT_ZOMBIE) {
|
||||
/*
|
||||
* If we were the last child thread and the leader has
|
||||
* exited already, and the leader's parent ignores SIGCHLD,
|
||||
|
@ -241,7 +242,8 @@ struct pid *session_of_pgrp(struct pid *pgrp)
|
|||
*
|
||||
* "I ask you, have you ever known what it is to be an orphan?"
|
||||
*/
|
||||
static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task)
|
||||
static int will_become_orphaned_pgrp(struct pid *pgrp,
|
||||
struct task_struct *ignored_task)
|
||||
{
|
||||
struct task_struct *p;
|
||||
|
||||
|
@ -425,6 +427,7 @@ static void exit_mm(struct task_struct * tsk)
|
|||
core_state = mm->core_state;
|
||||
if (core_state) {
|
||||
struct core_thread self;
|
||||
|
||||
up_read(&mm->mmap_sem);
|
||||
|
||||
self.task = tsk;
|
||||
|
@ -566,6 +569,7 @@ static void forget_original_parent(struct task_struct *father)
|
|||
|
||||
list_for_each_entry_safe(p, n, &father->children, sibling) {
|
||||
struct task_struct *t = p;
|
||||
|
||||
do {
|
||||
t->real_parent = reaper;
|
||||
if (t->parent == father) {
|
||||
|
@ -649,8 +653,7 @@ static void check_stack_usage(void)
|
|||
|
||||
spin_lock(&low_water_lock);
|
||||
if (free < lowest_to_date) {
|
||||
printk(KERN_WARNING "%s (%d) used greatest stack depth: "
|
||||
"%lu bytes left\n",
|
||||
pr_warn("%s (%d) used greatest stack depth: %lu bytes left\n",
|
||||
current->comm, task_pid_nr(current), free);
|
||||
lowest_to_date = free;
|
||||
}
|
||||
|
@ -692,8 +695,7 @@ void do_exit(long code)
|
|||
* leave this task alone and wait for reboot.
|
||||
*/
|
||||
if (unlikely(tsk->flags & PF_EXITING)) {
|
||||
printk(KERN_ALERT
|
||||
"Fixing recursive fault but reboot is needed!\n");
|
||||
pr_alert("Fixing recursive fault but reboot is needed!\n");
|
||||
/*
|
||||
* We can do this unlocked here. The futex code uses
|
||||
* this flag just to verify whether the pi state
|
||||
|
@ -717,7 +719,7 @@ void do_exit(long code)
|
|||
raw_spin_unlock_wait(&tsk->pi_lock);
|
||||
|
||||
if (unlikely(in_atomic()))
|
||||
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
|
||||
pr_info("note: %s[%d] exited with preempt_count %d\n",
|
||||
current->comm, task_pid_nr(current),
|
||||
preempt_count());
|
||||
|
||||
|
@ -837,7 +839,6 @@ void do_exit(long code)
|
|||
for (;;)
|
||||
cpu_relax(); /* For when BUG is null */
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(do_exit);
|
||||
|
||||
void complete_and_exit(struct completion *comp, long code)
|
||||
|
@ -847,7 +848,6 @@ void complete_and_exit(struct completion *comp, long code)
|
|||
|
||||
do_exit(code);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(complete_and_exit);
|
||||
|
||||
SYSCALL_DEFINE1(exit, int, error_code)
|
||||
|
@ -870,6 +870,7 @@ do_group_exit(int exit_code)
|
|||
exit_code = sig->group_exit_code;
|
||||
else if (!thread_group_empty(current)) {
|
||||
struct sighand_struct *const sighand = current->sighand;
|
||||
|
||||
spin_lock_irq(&sighand->siglock);
|
||||
if (signal_group_exit(sig))
|
||||
/* Another thread got here before we took the lock. */
|
||||
|
@ -1034,9 +1035,9 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
|
|||
* as other threads in the parent group can be right
|
||||
* here reaping other children at the same time.
|
||||
*
|
||||
* We use thread_group_cputime_adjusted() to get times for the thread
|
||||
* group, which consolidates times for all threads in the
|
||||
* group including the group leader.
|
||||
* We use thread_group_cputime_adjusted() to get times for
|
||||
* the thread group, which consolidates times for all threads
|
||||
* in the group including the group leader.
|
||||
*/
|
||||
thread_group_cputime_adjusted(p, &tgutime, &tgstime);
|
||||
spin_lock_irq(&p->real_parent->sighand->siglock);
|
||||
|
@ -1418,6 +1419,7 @@ static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
|
|||
|
||||
list_for_each_entry(p, &tsk->children, sibling) {
|
||||
int ret = wait_consider_task(wo, 0, p);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
@ -1431,6 +1433,7 @@ static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
|
|||
|
||||
list_for_each_entry(p, &tsk->ptraced, ptrace_entry) {
|
||||
int ret = wait_consider_task(wo, 1, p);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче