aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2014-09-25 13:26:37 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-28 17:29:01 -0400
commit18d0264f630e200772bf236ac5747c47e908501e (patch)
tree1881985374a2411bf9262e1e5977c8f4efd39849 /net/sched
parent5804283d7cb1da46485950d545dd7869137dcda5 (diff)
net_sched: remove the first parameter from tcf_exts_destroy()
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <hadi@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c2
-rw-r--r--net/sched/cls_basic.c4
-rw-r--r--net/sched/cls_bpf.c4
-rw-r--r--net/sched/cls_cgroup.c6
-rw-r--r--net/sched/cls_flow.c4
-rw-r--r--net/sched/cls_fw.c4
-rw-r--r--net/sched/cls_route.c4
-rw-r--r--net/sched/cls_rsvp.h4
-rw-r--r--net/sched/cls_tcindex.c4
-rw-r--r--net/sched/cls_u32.c4
10 files changed, 20 insertions, 20 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index e547efdaba9d..77147c8c4acc 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -496,7 +496,7 @@ out:
496 return skb->len; 496 return skb->len;
497} 497}
498 498
499void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts) 499void tcf_exts_destroy(struct tcf_exts *exts)
500{ 500{
501#ifdef CONFIG_NET_CLS_ACT 501#ifdef CONFIG_NET_CLS_ACT
502 tcf_action_destroy(&exts->actions, TCA_ACT_UNBIND); 502 tcf_action_destroy(&exts->actions, TCA_ACT_UNBIND);
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 1937298d6775..fe20826a79e7 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -94,7 +94,7 @@ static void basic_delete_filter(struct rcu_head *head)
94 struct tcf_proto *tp = f->tp; 94 struct tcf_proto *tp = f->tp;
95 95
96 tcf_unbind_filter(tp, &f->res); 96 tcf_unbind_filter(tp, &f->res);
97 tcf_exts_destroy(tp, &f->exts); 97 tcf_exts_destroy(&f->exts);
98 tcf_em_tree_destroy(tp, &f->ematches); 98 tcf_em_tree_destroy(tp, &f->ematches);
99 kfree(f); 99 kfree(f);
100} 100}
@@ -161,7 +161,7 @@ static int basic_set_parms(struct net *net, struct tcf_proto *tp,
161 161
162 return 0; 162 return 0;
163errout: 163errout:
164 tcf_exts_destroy(tp, &e); 164 tcf_exts_destroy(&e);
165 return err; 165 return err;
166} 166}
167 167
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 4e3f5bfc0b26..4318d067b0a0 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -93,7 +93,7 @@ static int cls_bpf_init(struct tcf_proto *tp)
93static void cls_bpf_delete_prog(struct tcf_proto *tp, struct cls_bpf_prog *prog) 93static void cls_bpf_delete_prog(struct tcf_proto *tp, struct cls_bpf_prog *prog)
94{ 94{
95 tcf_unbind_filter(tp, &prog->res); 95 tcf_unbind_filter(tp, &prog->res);
96 tcf_exts_destroy(tp, &prog->exts); 96 tcf_exts_destroy(&prog->exts);
97 97
98 bpf_prog_destroy(prog->filter); 98 bpf_prog_destroy(prog->filter);
99 99
@@ -217,7 +217,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
217errout_free: 217errout_free:
218 kfree(bpf_ops); 218 kfree(bpf_ops);
219errout: 219errout:
220 tcf_exts_destroy(tp, &exts); 220 tcf_exts_destroy(&exts);
221 return ret; 221 return ret;
222} 222}
223 223
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 15c34d4ccd9e..3409f168225f 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -86,7 +86,7 @@ static void cls_cgroup_destroy_rcu(struct rcu_head *root)
86 struct cls_cgroup_head, 86 struct cls_cgroup_head,
87 rcu); 87 rcu);
88 88
89 tcf_exts_destroy(head->tp, &head->exts); 89 tcf_exts_destroy(&head->exts);
90 tcf_em_tree_destroy(head->tp, &head->ematches); 90 tcf_em_tree_destroy(head->tp, &head->ematches);
91 kfree(head); 91 kfree(head);
92} 92}
@@ -135,7 +135,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
135 135
136 err = tcf_em_tree_validate(tp, tb[TCA_CGROUP_EMATCHES], &t); 136 err = tcf_em_tree_validate(tp, tb[TCA_CGROUP_EMATCHES], &t);
137 if (err < 0) { 137 if (err < 0) {
138 tcf_exts_destroy(tp, &e); 138 tcf_exts_destroy(&e);
139 goto errout; 139 goto errout;
140 } 140 }
141 141
@@ -156,7 +156,7 @@ static void cls_cgroup_destroy(struct tcf_proto *tp)
156 struct cls_cgroup_head *head = rtnl_dereference(tp->root); 156 struct cls_cgroup_head *head = rtnl_dereference(tp->root);
157 157
158 if (head) { 158 if (head) {
159 tcf_exts_destroy(tp, &head->exts); 159 tcf_exts_destroy(&head->exts);
160 tcf_em_tree_destroy(tp, &head->ematches); 160 tcf_em_tree_destroy(tp, &head->ematches);
161 RCU_INIT_POINTER(tp->root, NULL); 161 RCU_INIT_POINTER(tp->root, NULL);
162 kfree_rcu(head, rcu); 162 kfree_rcu(head, rcu);
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c
index 95736fa479f3..f18d27f7b5f2 100644
--- a/net/sched/cls_flow.c
+++ b/net/sched/cls_flow.c
@@ -354,7 +354,7 @@ static void flow_destroy_filter(struct rcu_head *head)
354 struct flow_filter *f = container_of(head, struct flow_filter, rcu); 354 struct flow_filter *f = container_of(head, struct flow_filter, rcu);
355 355
356 del_timer_sync(&f->perturb_timer); 356 del_timer_sync(&f->perturb_timer);
357 tcf_exts_destroy(f->tp, &f->exts); 357 tcf_exts_destroy(&f->exts);
358 tcf_em_tree_destroy(f->tp, &f->ematches); 358 tcf_em_tree_destroy(f->tp, &f->ematches);
359 kfree(f); 359 kfree(f);
360} 360}
@@ -533,7 +533,7 @@ err2:
533 tcf_em_tree_destroy(tp, &t); 533 tcf_em_tree_destroy(tp, &t);
534 kfree(fnew); 534 kfree(fnew);
535err1: 535err1:
536 tcf_exts_destroy(tp, &e); 536 tcf_exts_destroy(&e);
537 return err; 537 return err;
538} 538}
539 539
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 2650285620ee..da805aeeb65c 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -126,7 +126,7 @@ static void fw_delete_filter(struct rcu_head *head)
126 struct tcf_proto *tp = f->tp; 126 struct tcf_proto *tp = f->tp;
127 127
128 tcf_unbind_filter(tp, &f->res); 128 tcf_unbind_filter(tp, &f->res);
129 tcf_exts_destroy(tp, &f->exts); 129 tcf_exts_destroy(&f->exts);
130 kfree(f); 130 kfree(f);
131} 131}
132 132
@@ -223,7 +223,7 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
223 223
224 return 0; 224 return 0;
225errout: 225errout:
226 tcf_exts_destroy(tp, &e); 226 tcf_exts_destroy(&e);
227 return err; 227 return err;
228} 228}
229 229
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index ba96deacf27c..b665aee661f7 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -272,7 +272,7 @@ route4_delete_filter(struct rcu_head *head)
272 struct tcf_proto *tp = f->tp; 272 struct tcf_proto *tp = f->tp;
273 273
274 tcf_unbind_filter(tp, &f->res); 274 tcf_unbind_filter(tp, &f->res);
275 tcf_exts_destroy(tp, &f->exts); 275 tcf_exts_destroy(&f->exts);
276 kfree(f); 276 kfree(f);
277} 277}
278 278
@@ -456,7 +456,7 @@ static int route4_set_parms(struct net *net, struct tcf_proto *tp,
456 456
457 return 0; 457 return 0;
458errout: 458errout:
459 tcf_exts_destroy(tp, &e); 459 tcf_exts_destroy(&e);
460 return err; 460 return err;
461} 461}
462 462
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
index b044c208b133..1c64a09753c4 100644
--- a/net/sched/cls_rsvp.h
+++ b/net/sched/cls_rsvp.h
@@ -264,7 +264,7 @@ static void
264rsvp_delete_filter(struct tcf_proto *tp, struct rsvp_filter *f) 264rsvp_delete_filter(struct tcf_proto *tp, struct rsvp_filter *f)
265{ 265{
266 tcf_unbind_filter(tp, &f->res); 266 tcf_unbind_filter(tp, &f->res);
267 tcf_exts_destroy(tp, &f->exts); 267 tcf_exts_destroy(&f->exts);
268 kfree_rcu(f, rcu); 268 kfree_rcu(f, rcu);
269} 269}
270 270
@@ -577,7 +577,7 @@ insert:
577errout: 577errout:
578 kfree(f); 578 kfree(f);
579errout2: 579errout2:
580 tcf_exts_destroy(tp, &e); 580 tcf_exts_destroy(&e);
581 return err; 581 return err;
582} 582}
583 583
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 5054fae33a48..e3c6fa3ea3d2 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -169,7 +169,7 @@ found:
169 rcu_assign_pointer(*walk, rtnl_dereference(f->next)); 169 rcu_assign_pointer(*walk, rtnl_dereference(f->next));
170 } 170 }
171 tcf_unbind_filter(tp, &r->res); 171 tcf_unbind_filter(tp, &r->res);
172 tcf_exts_destroy(tp, &r->exts); 172 tcf_exts_destroy(&r->exts);
173 if (f) 173 if (f)
174 kfree_rcu(f, rcu); 174 kfree_rcu(f, rcu);
175 return 0; 175 return 0;
@@ -401,7 +401,7 @@ errout_alloc:
401 kfree(cp->h); 401 kfree(cp->h);
402errout: 402errout:
403 kfree(cp); 403 kfree(cp);
404 tcf_exts_destroy(tp, &e); 404 tcf_exts_destroy(&e);
405 return err; 405 return err;
406} 406}
407 407
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index ef97a646ee94..4be3ebf46d67 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -359,7 +359,7 @@ static int u32_destroy_key(struct tcf_proto *tp,
359 bool free_pf) 359 bool free_pf)
360{ 360{
361 tcf_unbind_filter(tp, &n->res); 361 tcf_unbind_filter(tp, &n->res);
362 tcf_exts_destroy(tp, &n->exts); 362 tcf_exts_destroy(&n->exts);
363 if (n->ht_down) 363 if (n->ht_down)
364 n->ht_down->refcnt--; 364 n->ht_down->refcnt--;
365#ifdef CONFIG_CLS_U32_PERF 365#ifdef CONFIG_CLS_U32_PERF
@@ -606,7 +606,7 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp,
606 606
607 return 0; 607 return 0;
608errout: 608errout:
609 tcf_exts_destroy(tp, &e); 609 tcf_exts_destroy(&e);
610 return err; 610 return err;
611} 611}
612 612