All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pidns: remove the useless function is_container_init
@ 2012-11-19 10:44 ` Gao feng
  0 siblings, 0 replies; 8+ messages in thread
From: Gao feng @ 2012-11-19 10:44 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w

since commit 1cdcbec1a3372c0c49c59d292e708fd07b509f18,
is_container_init has no used for a long time.

just remove it.

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] pidns: remove the useless function is_container_init
@ 2012-11-19 10:44 ` Gao feng
  0 siblings, 0 replies; 8+ messages in thread
From: Gao feng @ 2012-11-19 10:44 UTC (permalink / raw)
  To: containers, linux-kernel; +Cc: ebiederm, serge, akpm, Gao feng

since commit 1cdcbec1a3372c0c49c59d292e708fd07b509f18,
is_container_init has no used for a long time.

just remove it.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] pidns: remove the useless function is_container_init
  2012-11-19 10:44 ` Gao feng
@ 2012-11-19 14:12     ` Serge E. Hallyn
  -1 siblings, 0 replies; 8+ messages in thread
From: Serge E. Hallyn @ 2012-11-19 14:12 UTC (permalink / raw)
  To: Gao feng
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pidns: remove the useless function is_container_init
@ 2012-11-19 14:12     ` Serge E. Hallyn
  0 siblings, 0 replies; 8+ messages in thread
From: Serge E. Hallyn @ 2012-11-19 14:12 UTC (permalink / raw)
  To: Gao feng; +Cc: containers, linux-kernel, ebiederm, serge, akpm

Quoting Gao feng (gaofeng@cn.fujitsu.com):
> 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@cn.fujitsu.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pidns: remove the useless function is_container_init
  2012-11-19 14:12     ` Serge E. Hallyn
@ 2012-11-19 14:21         ` Eric W. Biederman
  -1 siblings, 0 replies; 8+ messages in thread
From: Eric W. Biederman @ 2012-11-19 14:21 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

"Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org> writes:

> 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.

Exports do not create an ABI.  No internal kernel users are enough.

Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pidns: remove the useless function is_container_init
@ 2012-11-19 14:21         ` Eric W. Biederman
  0 siblings, 0 replies; 8+ messages in thread
From: Eric W. Biederman @ 2012-11-19 14:21 UTC (permalink / raw)
  To: Serge E. Hallyn; +Cc: Gao feng, containers, linux-kernel, akpm

"Serge E. Hallyn" <serge@hallyn.com> writes:

> Quoting Gao feng (gaofeng@cn.fujitsu.com):
>> 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.

Exports do not create an ABI.  No internal kernel users are enough.

Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pidns: remove the useless function is_container_init
  2012-11-19 14:21         ` Eric W. Biederman
@ 2012-11-19 14:33             ` Serge E. Hallyn
  -1 siblings, 0 replies; 8+ messages in thread
From: Serge E. Hallyn @ 2012-11-19 14:33 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b

Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org):
> "Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org> writes:
> 
> > 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.
> 
> Exports do not create an ABI.  No internal kernel users are enough.

Ok.  I personally don't know of any out of tree users anyway, just seemed
like a warning for one cycle would be friendly :)

Acked-by: Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

thanks,
-serge

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] pidns: remove the useless function is_container_init
@ 2012-11-19 14:33             ` Serge E. Hallyn
  0 siblings, 0 replies; 8+ messages in thread
From: Serge E. Hallyn @ 2012-11-19 14:33 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Serge E. Hallyn, Gao feng, containers, linux-kernel, akpm

Quoting Eric W. Biederman (ebiederm@xmission.com):
> "Serge E. Hallyn" <serge@hallyn.com> writes:
> 
> > Quoting Gao feng (gaofeng@cn.fujitsu.com):
> >> 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.
> 
> Exports do not create an ABI.  No internal kernel users are enough.

Ok.  I personally don't know of any out of tree users anyway, just seemed
like a warning for one cycle would be friendly :)

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

thanks,
-serge

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-11-19 14:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 10:44 [PATCH] pidns: remove the useless function is_container_init Gao feng
2012-11-19 10:44 ` Gao feng
     [not found] ` <1353321882-30491-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-11-19 14:12   ` Serge E. Hallyn
2012-11-19 14:12     ` Serge E. Hallyn
     [not found]     ` <20121119141224.GA4321-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2012-11-19 14:21       ` Eric W. Biederman
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
2012-11-19 14:33             ` Serge E. Hallyn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.