Skip to contentSkip to conversation

devcg: remove parent_cgroup.

PATCH Applied Rami Rosen 5 participants 6 messages Apr 16, 2013 – Apr 18, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rami Rosen

author
#0 lore raw

PATCH 1/1 devcg: remove parent_cgroup.

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

---
 security/device_cgroup.c | 2 --
 1 file changed, 2 deletions(-)
security/device_cgroup.c +0 -2
index 994aecc..dd0dc57 100644
@@ -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;
 }
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 23 lines · 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().

---
 security/device_cgroup.c | 2 --
 1 file changed, 2 deletions(-)
security/device_cgroup.c +0 -1
index 994aecc..dd0dc57 100644
@@ -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)

security/device_cgroup.c static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup) · line 248

Quoted 7 lines
security/device_cgroup.c +0 -1
@@ -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

Signature · 1 line
Aristeu
Acked-by
#2 lore raw
Quoted 29 lines · Aristeu Rozanski
Quoted 28 lines · 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().

---
 security/device_cgroup.c | 2 --
 1 file changed, 2 deletions(-)
security/device_cgroup.c +0 -2
index 994aecc..dd0dc57 100644
@@ -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;
 
Quoted 6 lines

security/device_cgroup.c static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup) · line 248

Quoted 2 lines
security/device_cgroup.c +0 -0
 	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 :)

#3 lore raw
Quoted 35 lines · Serge Hallyn
Quoted 34 lines · Aristeu Rozanski
Quoted 23 lines · 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().

---
 security/device_cgroup.c | 2 --
 1 file changed, 2 deletions(-)
security/device_cgroup.c +0 -1
index 994aecc..dd0dc57 100644
@@ -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)

security/device_cgroup.c static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup) · line 248

Quoted 7 lines
security/device_cgroup.c +0 -1
@@ -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

Quoted 4 lines
Quoted 1 line

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

Signature · 1 line
Aristeu
maintainer Applied
#4 lore raw
In reply to Rami Rosen
Quoted 6 lines · 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().

Applied to cgroup/for-3.10.

Thanks.

Signature · 1 line
tejun

A message that is not in the archive (sent off-list or not yet received): 1366143895-21535-1-git-send-email-ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Applied
#6 lore raw
Quoted 6 lines · 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().

Applied to cgroup/for-3.10.

Thanks.

Signature · 1 line
tejun