Skip to content

Commit e57d5cf

Browse files
ramirosenhtejun
authored andcommitted
devcg: remove parent_cgroup.
In devcgroup_css_alloc(), there is no longer need for parent_cgroup. bd2953e("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>
1 parent f00baae commit e57d5cf

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

security/device_cgroup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,13 @@ static void devcgroup_offline(struct cgroup *cgroup)
236236
static struct cgroup_subsys_state *devcgroup_css_alloc(struct cgroup *cgroup)
237237
{
238238
struct dev_cgroup *dev_cgroup;
239-
struct cgroup *parent_cgroup;
240239

241240
dev_cgroup = kzalloc(sizeof(*dev_cgroup), GFP_KERNEL);
242241
if (!dev_cgroup)
243242
return ERR_PTR(-ENOMEM);
244243
INIT_LIST_HEAD(&dev_cgroup->exceptions);
245244
INIT_LIST_HEAD(&dev_cgroup->propagate_pending);
246245
dev_cgroup->behavior = DEVCG_DEFAULT_NONE;
247-
parent_cgroup = cgroup->parent;
248246

249247
return &dev_cgroup->css;
250248
}

0 commit comments

Comments
 (0)