Commit a5ba911e authored by Gao feng's avatar Gao feng Committed by Linus Torvalds

pidns: remove unused is_container_init()

Since commit 1cdcbec1 ("CRED: Neuter sys_capset()")
is_container_init() has no callers.
Signed-off-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d7402698
...@@ -1778,12 +1778,6 @@ static inline int is_global_init(struct task_struct *tsk) ...@@ -1778,12 +1778,6 @@ static inline int is_global_init(struct task_struct *tsk)
return tsk->pid == 1; 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 struct pid *cad_pid;
extern void free_task(struct task_struct *tsk); extern void free_task(struct task_struct *tsk);
......
...@@ -81,21 +81,6 @@ struct pid_namespace init_pid_ns = { ...@@ -81,21 +81,6 @@ struct pid_namespace init_pid_ns = {
}; };
EXPORT_SYMBOL_GPL(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 * Note: disable interrupts while the pidmap_lock is held as an
* interrupt might come in and do read_lock(&tasklist_lock). * interrupt might come in and do read_lock(&tasklist_lock).
......
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