diff options
| -rw-r--r-- | include/linux/cgroup.h | 1 | ||||
| -rw-r--r-- | kernel/cgroup.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 1d5196889048..e717a39f22ea 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -612,6 +612,7 @@ struct cgroup_subsys { | |||
| 612 | struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css); | 612 | struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css); |
| 613 | int (*css_online)(struct cgroup_subsys_state *css); | 613 | int (*css_online)(struct cgroup_subsys_state *css); |
| 614 | void (*css_offline)(struct cgroup_subsys_state *css); | 614 | void (*css_offline)(struct cgroup_subsys_state *css); |
| 615 | void (*css_released)(struct cgroup_subsys_state *css); | ||
| 615 | void (*css_free)(struct cgroup_subsys_state *css); | 616 | void (*css_free)(struct cgroup_subsys_state *css); |
| 616 | void (*css_reset)(struct cgroup_subsys_state *css); | 617 | void (*css_reset)(struct cgroup_subsys_state *css); |
| 617 | 618 | ||
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index dffa54041d4a..c8558693102b 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -4380,6 +4380,8 @@ static void css_release_work_fn(struct work_struct *work) | |||
| 4380 | if (ss) { | 4380 | if (ss) { |
| 4381 | /* css release path */ | 4381 | /* css release path */ |
| 4382 | cgroup_idr_remove(&ss->css_idr, css->id); | 4382 | cgroup_idr_remove(&ss->css_idr, css->id); |
| 4383 | if (ss->css_released) | ||
| 4384 | ss->css_released(css); | ||
| 4383 | } else { | 4385 | } else { |
| 4384 | /* cgroup release path */ | 4386 | /* cgroup release path */ |
| 4385 | cgroup_idr_remove(&cgrp->root->cgroup_idr, cgrp->id); | 4387 | cgroup_idr_remove(&cgrp->root->cgroup_idr, cgrp->id); |
