The patch titled Subject: pidns: remove unused is_container_init() has been added to the -mm tree. Its filename is pidns-remove-unused-is_container_init.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Gao feng <gaofeng@xxxxxxxxxxxxxx> Subject: pidns: remove unused is_container_init() since commit 1cdcbec1a3 ("CRED: Neuter sys_capset()") is_container_init() has no callers. Signed-off-by: Gao feng <gaofeng@xxxxxxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Acked-by: Serge Hallyn <serge.hallyn@xxxxxxxxxxxxx> Cc: James Morris <jmorris@xxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/sched.h | 6 ------ kernel/pid.c | 15 --------------- 2 files changed, 21 deletions(-) diff -puN include/linux/sched.h~pidns-remove-unused-is_container_init include/linux/sched.h --- a/include/linux/sched.h~pidns-remove-unused-is_container_init +++ a/include/linux/sched.h @@ -1769,12 +1769,6 @@ static inline int is_global_init(struct 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 -puN kernel/pid.c~pidns-remove-unused-is_container_init kernel/pid.c --- a/kernel/pid.c~pidns-remove-unused-is_container_init +++ a/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). _ Patches currently in -mm which might be from gaofeng@xxxxxxxxxxxxxx are pidns-remove-unused-is_container_init.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html