Commit 146a505d authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Linus Torvalds

Get rid of the kill_pgrp_info() function

There's only one caller left - the kill_pgrp one - so merge these two
functions and forget the kill_pgrp_info one.
Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
Reviewed-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d5df763b
...@@ -1689,7 +1689,6 @@ extern int send_sig_info(int, struct siginfo *, struct task_struct *); ...@@ -1689,7 +1689,6 @@ extern int send_sig_info(int, struct siginfo *, struct task_struct *);
extern int force_sigsegv(int, struct task_struct *); extern int force_sigsegv(int, struct task_struct *);
extern int force_sig_info(int, struct siginfo *, struct task_struct *); extern int force_sig_info(int, struct siginfo *, struct task_struct *);
extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
extern int kill_pgrp(struct pid *pid, int sig, int priv); extern int kill_pgrp(struct pid *pid, int sig, int priv);
......
...@@ -1018,7 +1018,7 @@ int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) ...@@ -1018,7 +1018,7 @@ int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
} }
/* /*
* kill_pgrp_info() sends a signal to a process group: this is what the tty * __kill_pgrp_info() sends a signal to a process group: this is what the tty
* control characters do (^C, ^Z etc) * control characters do (^C, ^Z etc)
*/ */
...@@ -1037,17 +1037,6 @@ int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp) ...@@ -1037,17 +1037,6 @@ int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp)
return success ? 0 : retval; return success ? 0 : retval;
} }
int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp)
{
int retval;
read_lock(&tasklist_lock);
retval = __kill_pgrp_info(sig, info, pgrp);
read_unlock(&tasklist_lock);
return retval;
}
int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
{ {
int error = -ESRCH; int error = -ESRCH;
...@@ -1236,7 +1225,13 @@ force_sigsegv(int sig, struct task_struct *p) ...@@ -1236,7 +1225,13 @@ force_sigsegv(int sig, struct task_struct *p)
int kill_pgrp(struct pid *pid, int sig, int priv) int kill_pgrp(struct pid *pid, int sig, int priv)
{ {
return kill_pgrp_info(sig, __si_special(priv), pid); int ret;
read_lock(&tasklist_lock);
ret = __kill_pgrp_info(sig, __si_special(priv), pid);
read_unlock(&tasklist_lock);
return ret;
} }
EXPORT_SYMBOL(kill_pgrp); EXPORT_SYMBOL(kill_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