devcg: remove parent_cgroup.
authorRami Rosen <ramirose@gmail.com>
Tue, 16 Apr 2013 20:24:55 +0000 (23:24 +0300)
committerTejun Heo <tj@kernel.org>
Thu, 18 Apr 2013 18:34:35 +0000 (11:34 -0700)
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@gmail.com>
Acked-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
security/device_cgroup.c

index 994aeccea51835be2fa6d9e867ce8851582b46f7..dd0dc574d78dd0774fd0e183f62ac677caa091e0 100644 (file)
@@ -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;
 }