From 660c8202484b8933efe65d1f89fe438a6ff0ea80 Mon Sep 17 00:00:00 2001 From: Gao feng Date: Mon, 17 Dec 2012 16:03:22 -0800 Subject: [PATCH] --- yaml --- r: 346462 b: refs/heads/master c: a5ba911ec3792168530d35e16a8ec3b6fc60bcb5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/sched.h | 6 ------ trunk/kernel/pid.c | 15 --------------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/[refs] b/[refs] index 8dd26e10517d..9bd2839d6d65 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d740269867021faf4ce38a449353d2b986c34a67 +refs/heads/master: a5ba911ec3792168530d35e16a8ec3b6fc60bcb5 diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index b089c92c609b..9914c662ed7b 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -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); diff --git a/trunk/kernel/pid.c b/trunk/kernel/pid.c index fd996c1ed9f8..a54a1123c7cf 100644 --- a/trunk/kernel/pid.c +++ b/trunk/kernel/pid.c @@ -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).