Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339351
b: refs/heads/master
c: 0ba18f7
h: refs/heads/master
i:
  339349: 1bea469
  339347: ce846b7
  339343: 1e25a39
v: v3
  • Loading branch information
Tejun Heo committed Nov 22, 2012
1 parent ffdc001 commit 563da2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0b2fdd2a51203f04ea0a5d716e033c15e0231af
refs/heads/master: 0ba18f7a5e268e095f79e32b7b47e8ce4fbabbe2
20 changes: 8 additions & 12 deletions trunk/net/sched/cls_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ static struct cgroup_subsys_state *cgrp_css_alloc(struct cgroup *cgrp)
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
if (!cs)
return ERR_PTR(-ENOMEM);
return &cs->css;
}

static int cgrp_css_online(struct cgroup *cgrp)
{
if (cgrp->parent)
cs->classid = cgrp_cls_state(cgrp->parent)->classid;

return &cs->css;
cgrp_cls_state(cgrp)->classid =
cgrp_cls_state(cgrp->parent)->classid;
return 0;
}

static void cgrp_css_free(struct cgroup *cgrp)
Expand Down Expand Up @@ -76,19 +80,11 @@ static struct cftype ss_files[] = {
struct cgroup_subsys net_cls_subsys = {
.name = "net_cls",
.css_alloc = cgrp_css_alloc,
.css_online = cgrp_css_online,
.css_free = cgrp_css_free,
.subsys_id = net_cls_subsys_id,
.base_cftypes = ss_files,
.module = THIS_MODULE,

/*
* While net_cls cgroup has the rudimentary hierarchy support of
* inheriting the parent's classid on cgroup creation, it doesn't
* properly propagates config changes in ancestors to their
* descendents. A child should follow the parent's configuration
* but be allowed to override it. Fix it and remove the following.
*/
.broken_hierarchy = true,
};

struct cls_cgroup_head {
Expand Down

0 comments on commit 563da2d

Please sign in to comment.