diff options
Diffstat (limited to 'net/sched/cls_cgroup.c')
-rw-r--r-- | net/sched/cls_cgroup.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 78ef2c5e130b..32a335194ca5 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
@@ -34,8 +34,6 @@ struct cgroup_subsys net_cls_subsys = { | |||
34 | .populate = cgrp_populate, | 34 | .populate = cgrp_populate, |
35 | #ifdef CONFIG_NET_CLS_CGROUP | 35 | #ifdef CONFIG_NET_CLS_CGROUP |
36 | .subsys_id = net_cls_subsys_id, | 36 | .subsys_id = net_cls_subsys_id, |
37 | #else | ||
38 | #define net_cls_subsys_id net_cls_subsys.subsys_id | ||
39 | #endif | 37 | #endif |
40 | .module = THIS_MODULE, | 38 | .module = THIS_MODULE, |
41 | }; | 39 | }; |
@@ -58,7 +56,8 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, | |||
58 | { | 56 | { |
59 | struct cgroup_cls_state *cs; | 57 | struct cgroup_cls_state *cs; |
60 | 58 | ||
61 | if (!(cs = kzalloc(sizeof(*cs), GFP_KERNEL))) | 59 | cs = kzalloc(sizeof(*cs), GFP_KERNEL); |
60 | if (!cs) | ||
62 | return ERR_PTR(-ENOMEM); | 61 | return ERR_PTR(-ENOMEM); |
63 | 62 | ||
64 | if (cgrp->parent) | 63 | if (cgrp->parent) |
@@ -96,8 +95,7 @@ static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp) | |||
96 | return cgroup_add_files(cgrp, ss, ss_files, ARRAY_SIZE(ss_files)); | 95 | return cgroup_add_files(cgrp, ss, ss_files, ARRAY_SIZE(ss_files)); |
97 | } | 96 | } |
98 | 97 | ||
99 | struct cls_cgroup_head | 98 | struct cls_cgroup_head { |
100 | { | ||
101 | u32 handle; | 99 | u32 handle; |
102 | struct tcf_exts exts; | 100 | struct tcf_exts exts; |
103 | struct tcf_ematch_tree ematches; | 101 | struct tcf_ematch_tree ematches; |
@@ -123,7 +121,7 @@ static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp, | |||
123 | * calls by looking at the number of nested bh disable calls because | 121 | * calls by looking at the number of nested bh disable calls because |
124 | * softirqs always disables bh. | 122 | * softirqs always disables bh. |
125 | */ | 123 | */ |
126 | if (softirq_count() != SOFTIRQ_OFFSET) { | 124 | if (in_serving_softirq()) { |
127 | /* If there is an sk_classid we'll use that. */ | 125 | /* If there is an sk_classid we'll use that. */ |
128 | if (!skb->sk) | 126 | if (!skb->sk) |
129 | return -1; | 127 | return -1; |
@@ -168,7 +166,7 @@ static int cls_cgroup_change(struct tcf_proto *tp, unsigned long base, | |||
168 | u32 handle, struct nlattr **tca, | 166 | u32 handle, struct nlattr **tca, |
169 | unsigned long *arg) | 167 | unsigned long *arg) |
170 | { | 168 | { |
171 | struct nlattr *tb[TCA_CGROUP_MAX+1]; | 169 | struct nlattr *tb[TCA_CGROUP_MAX + 1]; |
172 | struct cls_cgroup_head *head = tp->root; | 170 | struct cls_cgroup_head *head = tp->root; |
173 | struct tcf_ematch_tree t; | 171 | struct tcf_ematch_tree t; |
174 | struct tcf_exts e; | 172 | struct tcf_exts e; |