diff options
Diffstat (limited to 'net/sched/cls_cgroup.c')
-rw-r--r-- | net/sched/cls_cgroup.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 5ee72a001df0..af412ab2b477 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
@@ -23,16 +23,19 @@ | |||
23 | #include <net/sock.h> | 23 | #include <net/sock.h> |
24 | #include <net/cls_cgroup.h> | 24 | #include <net/cls_cgroup.h> |
25 | 25 | ||
26 | static inline struct cgroup_cls_state *css_cls_state(struct cgroup_subsys_state *css) | ||
27 | { | ||
28 | return css ? container_of(css, struct cgroup_cls_state, css) : NULL; | ||
29 | } | ||
30 | |||
26 | static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp) | 31 | static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp) |
27 | { | 32 | { |
28 | return container_of(cgroup_css(cgrp, net_cls_subsys_id), | 33 | return css_cls_state(cgroup_css(cgrp, net_cls_subsys_id)); |
29 | struct cgroup_cls_state, css); | ||
30 | } | 34 | } |
31 | 35 | ||
32 | static inline struct cgroup_cls_state *task_cls_state(struct task_struct *p) | 36 | static inline struct cgroup_cls_state *task_cls_state(struct task_struct *p) |
33 | { | 37 | { |
34 | return container_of(task_css(p, net_cls_subsys_id), | 38 | return css_cls_state(task_css(p, net_cls_subsys_id)); |
35 | struct cgroup_cls_state, css); | ||
36 | } | 39 | } |
37 | 40 | ||
38 | static struct cgroup_subsys_state *cgrp_css_alloc(struct cgroup *cgrp) | 41 | static struct cgroup_subsys_state *cgrp_css_alloc(struct cgroup *cgrp) |