Commit 84e7eb7a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove has_stopped_jobs()

patch from Bill Irwin

has_stopped_jobs() is completely unused. This patch removes
has_stopped_jobs() and renames __has_stopped_jobs() to has_stopped_jobs().
parent e5b36baf
......@@ -193,7 +193,7 @@ int is_orphaned_pgrp(int pgrp)
return will_become_orphaned_pgrp(pgrp, 0);
}
static inline int __has_stopped_jobs(int pgrp)
static inline int has_stopped_jobs(int pgrp)
{
int retval = 0;
struct task_struct *p;
......@@ -209,17 +209,6 @@ static inline int __has_stopped_jobs(int pgrp)
return retval;
}
static inline int has_stopped_jobs(int pgrp)
{
int retval;
read_lock(&tasklist_lock);
retval = __has_stopped_jobs(pgrp);
read_unlock(&tasklist_lock);
return retval;
}
/**
* reparent_to_init() - Reparent the calling kernel thread to the init task.
*
......@@ -506,7 +495,7 @@ static inline void reparent_thread(task_t *p, task_t *father, int traced)
(p->session == father->session)) {
int pgrp = p->pgrp;
if (__will_become_orphaned_pgrp(pgrp, 0) && __has_stopped_jobs(pgrp)) {
if (__will_become_orphaned_pgrp(pgrp, 0) && has_stopped_jobs(pgrp)) {
__kill_pg_info(SIGHUP, (void *)1, pgrp);
__kill_pg_info(SIGCONT, (void *)1, pgrp);
}
......@@ -591,7 +580,7 @@ static void exit_notify(void)
if ((t->pgrp != current->pgrp) &&
(t->session == current->session) &&
__will_become_orphaned_pgrp(current->pgrp, current) &&
__has_stopped_jobs(current->pgrp)) {
has_stopped_jobs(current->pgrp)) {
__kill_pg_info(SIGHUP, (void *)1, current->pgrp);
__kill_pg_info(SIGCONT, (void *)1, current->pgrp);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment