diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cgroup.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 12d66fee26f8..8a5dc91fbaad 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -75,6 +75,9 @@ struct cgroup_subsys_state { | |||
75 | /* reference count - access via css_[try]get() and css_put() */ | 75 | /* reference count - access via css_[try]get() and css_put() */ |
76 | struct percpu_ref refcnt; | 76 | struct percpu_ref refcnt; |
77 | 77 | ||
78 | /* the parent css */ | ||
79 | struct cgroup_subsys_state *parent; | ||
80 | |||
78 | unsigned long flags; | 81 | unsigned long flags; |
79 | /* ID for this css, if possible */ | 82 | /* ID for this css, if possible */ |
80 | struct css_id __rcu *id; | 83 | struct css_id __rcu *id; |
@@ -666,15 +669,7 @@ struct cgroup_subsys { | |||
666 | static inline | 669 | static inline |
667 | struct cgroup_subsys_state *css_parent(struct cgroup_subsys_state *css) | 670 | struct cgroup_subsys_state *css_parent(struct cgroup_subsys_state *css) |
668 | { | 671 | { |
669 | struct cgroup *parent_cgrp = css->cgroup->parent; | 672 | return css->parent; |
670 | |||
671 | if (!parent_cgrp) | ||
672 | return NULL; | ||
673 | |||
674 | if (css->ss) | ||
675 | return parent_cgrp->subsys[css->ss->subsys_id]; | ||
676 | else | ||
677 | return &parent_cgrp->dummy_css; | ||
678 | } | 673 | } |
679 | 674 | ||
680 | /** | 675 | /** |