From: "Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
To: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH] pidns: remove the useless function is_container_init
Date: Mon, 19 Nov 2012 14:12:24 +0000 [thread overview]
Message-ID: <20121119141224.GA4321@mail.hallyn.com> (raw)
In-Reply-To: <1353321882-30491-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Quoting Gao feng (gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org):
> since commit 1cdcbec1a3372c0c49c59d292e708fd07b509f18,
> is_container_init has no used for a long time.
>
> just remove it.
Only thing is it's being exported, so I think it needs to go through
deprecation.
> Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> ---
> include/linux/sched.h | 6 ------
> kernel/pid.c | 15 ---------------
> 2 files changed, 0 insertions(+), 21 deletions(-)
>
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 0dd42a0..3fadd26 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1710,12 +1710,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/kernel/pid.c b/kernel/pid.c
> index aebd4f5..8ccdf0e 100644
> --- a/kernel/pid.c
> +++ b/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).
> --
> 1.7.7.6
next prev parent reply other threads:[~2012-11-19 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 10:44 [PATCH] pidns: remove the useless function is_container_init Gao feng
[not found] ` <1353321882-30491-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-11-19 14:12 ` Serge E. Hallyn [this message]
[not found] ` <20121119141224.GA4321-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2012-11-19 14:21 ` Eric W. Biederman
[not found] ` <87obitad1v.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-11-19 14:33 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121119141224.GA4321@mail.hallyn.com \
--to=serge-a9i7lubdfnhqt0dzr+alfa@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox