]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pidns: remove unused is_container_init()
authorGao feng <gaofeng@cn.fujitsu.com>
Tue, 18 Dec 2012 00:03:22 +0000 (16:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 01:15:23 +0000 (17:15 -0800)
Since commit 1cdcbec1a337 ("CRED: Neuter sys_capset()")
is_container_init() has no callers.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sched.h
kernel/pid.c

index b089c92c609b0a98e305513abb2485d5c9599fbd..9914c662ed7b5b581dd0ec8019cc6ba52365c922 100644 (file)
@@ -1778,12 +1778,6 @@ static inline int is_global_init(struct task_struct *tsk)
        return tsk->pid == 1;
 }
 
-/*
- * is_container_init:
- * check whether in the task is init in its own pid namespace.
- */
-extern int is_container_init(struct task_struct *tsk);
-
 extern struct pid *cad_pid;
 
 extern void free_task(struct task_struct *tsk);
index fd996c1ed9f891988607812abb95dc8820ab3751..a54a1123c7cf122a84f78da59944df34aff2a3a7 100644 (file)
@@ -81,21 +81,6 @@ struct pid_namespace init_pid_ns = {
 };
 EXPORT_SYMBOL_GPL(init_pid_ns);
 
-int is_container_init(struct task_struct *tsk)
-{
-       int ret = 0;
-       struct pid *pid;
-
-       rcu_read_lock();
-       pid = task_pid(tsk);
-       if (pid != NULL && pid->numbers[pid->level].nr == 1)
-               ret = 1;
-       rcu_read_unlock();
-
-       return ret;
-}
-EXPORT_SYMBOL(is_container_init);
-
 /*
  * Note: disable interrupts while the pidmap_lock is held as an
  * interrupt might come in and do read_lock(&tasklist_lock).