* [PATCH] devcg: remove parent_cgroup.
@ 2013-04-16 20:24 Rami Rosen
       [not found] ` <1366143895-21535-1-git-send-email-ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Rami Rosen @ 2013-04-16 20:24 UTC (permalink / raw)
  To: tj-DgEjT+Ai2ygdnm+yROfE0A, lizefan-hv44wF8Li93QT0dZR+AlfA,
	aris-H+wXaHxf7aLQT0dZR+AlfA
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rami Rosen
In devcgroup_css_alloc(), there is no longer need for parent_cgroup.
bd2953ebbb("devcg: propagate local changes down the hierarchy") made
the variable parent_cgroup redundant. This patch removes parent_cgroup
from devcgroup_css_alloc().
Signed-off-by: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 security/device_cgroup.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 994aecc..dd0dc57 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -236,7 +236,6 @@ static void devcgroup_offline(struct cgroup *cgroup)
 static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
 {
 	struct dev_cgroup *dev_cgroup;
-	struct cgroup *parent_cgroup;
 
 	dev_cgroup = kzalloc(sizeof(*dev_cgroup), GFP_KERNEL);
 	if (!dev_cgroup)
@@ -244,7 +243,6 @@ static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
 	INIT_LIST_HEAD(&dev_cgroup->exceptions);
 	INIT_LIST_HEAD(&dev_cgroup->propagate_pending);
 	dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
-	parent_cgroup = cgroup->parent;
 
 	return &dev_cgroup->css;
 }
-- 
1.8.1.4
^ permalink raw reply related	[flat|nested] 5+ messages in thread
* Re: [PATCH] devcg: remove parent_cgroup.
       [not found] ` <1366143895-21535-1-git-send-email-ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-04-16 20:37   ` Aristeu Rozanski
       [not found]     ` <20130416203700.GP24899-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2013-04-18 18:36   ` Tejun Heo
  1 sibling, 1 reply; 5+ messages in thread
From: Aristeu Rozanski @ 2013-04-16 20:37 UTC (permalink / raw)
  To: Rami Rosen
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, tj-DgEjT+Ai2ygdnm+yROfE0A,
	cgroups-u79uwXL29TY76Z2rM5mHXA
On Tue, Apr 16, 2013 at 11:24:55PM +0300, Rami Rosen wrote:
> In devcgroup_css_alloc(), there is no longer need for parent_cgroup.
> bd2953ebbb("devcg: propagate local changes down the hierarchy") made
> the variable parent_cgroup redundant. This patch removes parent_cgroup
> from devcgroup_css_alloc().
> 
> Signed-off-by: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  security/device_cgroup.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/security/device_cgroup.c b/security/device_cgroup.c
> index 994aecc..dd0dc57 100644
> --- a/security/device_cgroup.c
> +++ b/security/device_cgroup.c
> @@ -236,7 +236,6 @@ static void devcgroup_offline(struct cgroup *cgroup)
>  static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
>  {
>  	struct dev_cgroup *dev_cgroup;
> -	struct cgroup *parent_cgroup;
>  
>  	dev_cgroup = kzalloc(sizeof(*dev_cgroup), GFP_KERNEL);
>  	if (!dev_cgroup)
> @@ -244,7 +243,6 @@ static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
>  	INIT_LIST_HEAD(&dev_cgroup->exceptions);
>  	INIT_LIST_HEAD(&dev_cgroup->propagate_pending);
>  	dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
> -	parent_cgroup = cgroup->parent;
>  
>  	return &dev_cgroup->css;
>  }
oops
ACK
-- 
Aristeu
^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH] devcg: remove parent_cgroup.
       [not found]     ` <20130416203700.GP24899-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-04-16 21:07       ` Serge Hallyn
  2013-04-16 21:10         ` Aristeu Rozanski
  0 siblings, 1 reply; 5+ messages in thread
From: Serge Hallyn @ 2013-04-16 21:07 UTC (permalink / raw)
  To: Aristeu Rozanski
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Rami Rosen, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	tj-DgEjT+Ai2ygdnm+yROfE0A, cgroups-u79uwXL29TY76Z2rM5mHXA
Quoting Aristeu Rozanski (aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org):
> On Tue, Apr 16, 2013 at 11:24:55PM +0300, Rami Rosen wrote:
> > In devcgroup_css_alloc(), there is no longer need for parent_cgroup.
> > bd2953ebbb("devcg: propagate local changes down the hierarchy") made
> > the variable parent_cgroup redundant. This patch removes parent_cgroup
> > from devcgroup_css_alloc().
> > 
> > Signed-off-by: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  security/device_cgroup.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/security/device_cgroup.c b/security/device_cgroup.c
> > index 994aecc..dd0dc57 100644
> > --- a/security/device_cgroup.c
> > +++ b/security/device_cgroup.c
> > @@ -236,7 +236,6 @@ static void devcgroup_offline(struct cgroup *cgroup)
> >  static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
> >  {
> >  	struct dev_cgroup *dev_cgroup;
> > -	struct cgroup *parent_cgroup;
> >  
> >  	dev_cgroup = kzalloc(sizeof(*dev_cgroup), GFP_KERNEL);
> >  	if (!dev_cgroup)
> > @@ -244,7 +243,6 @@ static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
> >  	INIT_LIST_HEAD(&dev_cgroup->exceptions);
> >  	INIT_LIST_HEAD(&dev_cgroup->propagate_pending);
> >  	dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
> > -	parent_cgroup = cgroup->parent;
> >  
> >  	return &dev_cgroup->css;
> >  }
> 
> oops
> 
> ACK
Not seeing the patches this is based on in Linus' tree yet, but given
the context above I don't see how it could not be right :)
Acked-by: Serge E. Hallyn <serge.hallyn-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH] devcg: remove parent_cgroup.
  2013-04-16 21:07       ` Serge Hallyn
@ 2013-04-16 21:10         ` Aristeu Rozanski
  0 siblings, 0 replies; 5+ messages in thread
From: Aristeu Rozanski @ 2013-04-16 21:10 UTC (permalink / raw)
  To: Serge Hallyn
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Rami Rosen, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	tj-DgEjT+Ai2ygdnm+yROfE0A, cgroups-u79uwXL29TY76Z2rM5mHXA
On Tue, Apr 16, 2013 at 04:07:25PM -0500, Serge Hallyn wrote:
> Quoting Aristeu Rozanski (aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org):
> > On Tue, Apr 16, 2013 at 11:24:55PM +0300, Rami Rosen wrote:
> > > In devcgroup_css_alloc(), there is no longer need for parent_cgroup.
> > > bd2953ebbb("devcg: propagate local changes down the hierarchy") made
> > > the variable parent_cgroup redundant. This patch removes parent_cgroup
> > > from devcgroup_css_alloc().
> > > 
> > > Signed-off-by: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > ---
> > >  security/device_cgroup.c | 2 --
> > >  1 file changed, 2 deletions(-)
> > > 
> > > diff --git a/security/device_cgroup.c b/security/device_cgroup.c
> > > index 994aecc..dd0dc57 100644
> > > --- a/security/device_cgroup.c
> > > +++ b/security/device_cgroup.c
> > > @@ -236,7 +236,6 @@ static void devcgroup_offline(struct cgroup *cgroup)
> > >  static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
> > >  {
> > >  	struct dev_cgroup *dev_cgroup;
> > > -	struct cgroup *parent_cgroup;
> > >  
> > >  	dev_cgroup = kzalloc(sizeof(*dev_cgroup), GFP_KERNEL);
> > >  	if (!dev_cgroup)
> > > @@ -244,7 +243,6 @@ static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
> > >  	INIT_LIST_HEAD(&dev_cgroup->exceptions);
> > >  	INIT_LIST_HEAD(&dev_cgroup->propagate_pending);
> > >  	dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
> > > -	parent_cgroup = cgroup->parent;
> > >  
> > >  	return &dev_cgroup->css;
> > >  }
> > 
> > oops
> > 
> > ACK
> 
> Not seeing the patches this is based on in Linus' tree yet, but given
> the context above I don't see how it could not be right :)
they're on Tejun's tree
-- 
Aristeu
^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [PATCH] devcg: remove parent_cgroup.
       [not found] ` <1366143895-21535-1-git-send-email-ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-04-16 20:37   ` Aristeu Rozanski
@ 2013-04-18 18:36   ` Tejun Heo
  1 sibling, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2013-04-18 18:36 UTC (permalink / raw)
  To: Rami Rosen
  Cc: lizefan-hv44wF8Li93QT0dZR+AlfA, aris-H+wXaHxf7aLQT0dZR+AlfA,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw
On Tue, Apr 16, 2013 at 11:24:55PM +0300, Rami Rosen wrote:
> In devcgroup_css_alloc(), there is no longer need for parent_cgroup.
> bd2953ebbb("devcg: propagate local changes down the hierarchy") made
> the variable parent_cgroup redundant. This patch removes parent_cgroup
> from devcgroup_css_alloc().
> 
> Signed-off-by: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied to cgroup/for-3.10.
Thanks.
-- 
tejun
^ permalink raw reply	[flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-18 18:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16 20:24 [PATCH] devcg: remove parent_cgroup Rami Rosen
     [not found] ` <1366143895-21535-1-git-send-email-ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-16 20:37   ` Aristeu Rozanski
     [not found]     ` <20130416203700.GP24899-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-04-16 21:07       ` Serge Hallyn
2013-04-16 21:10         ` Aristeu Rozanski
2013-04-18 18:36   ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).