]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
exit.c: unexport __set_special_pids()
authorOleg Nesterov <oleg@redhat.com>
Thu, 27 Jun 2013 23:53:54 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:57 +0000 (16:38 +1000)
Move __set_special_pids() from exit.c to sys.c close to its single caller
and make it static.

And rename it to set_special_pids(), another helper with this name has
gone away.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/sched.h
kernel/exit.c
kernel/sys.c

index 6af2cc51ab1a4ba21b0b91686ef940a8a5bb66b3..fc09d217d870d5570469fdc5be943de1dd8a6237 100644 (file)
@@ -1945,8 +1945,6 @@ extern struct task_struct *find_task_by_vpid(pid_t nr);
 extern struct task_struct *find_task_by_pid_ns(pid_t nr,
                struct pid_namespace *ns);
 
-extern void __set_special_pids(struct pid *pid);
-
 /* per-UID process charging. */
 extern struct user_struct * alloc_uid(kuid_t);
 static inline struct user_struct *get_uid(struct user_struct *u)
index 2f3be8b6904b25513fe3946e11c3d8a1e824e74d..a949819055d51d5d4335544f81016770af6b687e 100644 (file)
@@ -312,17 +312,6 @@ kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
        }
 }
 
-void __set_special_pids(struct pid *pid)
-{
-       struct task_struct *curr = current->group_leader;
-
-       if (task_session(curr) != pid)
-               change_pid(curr, PIDTYPE_SID, pid);
-
-       if (task_pgrp(curr) != pid)
-               change_pid(curr, PIDTYPE_PGID, pid);
-}
-
 /*
  * Let kernel threads use this to say that they allow a certain signal.
  * Must not be used if kthread was cloned with CLONE_SIGHAND.
index 7bf50dcc6d5345d0a2919287f2b5e51577301132..071de900c824540abd7e42ee942e2ed89767643b 100644 (file)
@@ -1309,6 +1309,17 @@ out:
        return retval;
 }
 
+static void set_special_pids(struct pid *pid)
+{
+       struct task_struct *curr = current->group_leader;
+
+       if (task_session(curr) != pid)
+               change_pid(curr, PIDTYPE_SID, pid);
+
+       if (task_pgrp(curr) != pid)
+               change_pid(curr, PIDTYPE_PGID, pid);
+}
+
 SYSCALL_DEFINE0(setsid)
 {
        struct task_struct *group_leader = current->group_leader;
@@ -1328,7 +1339,7 @@ SYSCALL_DEFINE0(setsid)
                goto out;
 
        group_leader->signal->leader = 1;
-       __set_special_pids(sid);
+       set_special_pids(sid);
 
        proc_clear_tty(group_leader);