Skip to content

Commit

Permalink
net_sched: remove the first parameter from tcf_exts_destroy()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
congwang authored and davem330 committed Sep 28, 2014
1 parent 5804283 commit 18d0264
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion include/net/pkt_cls.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts,
int tcf_exts_validate(struct net *net, struct tcf_proto *tp,
struct nlattr **tb, struct nlattr *rate_tlv,
struct tcf_exts *exts, bool ovr);
void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts);
void tcf_exts_destroy(struct tcf_exts *exts);
void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
struct tcf_exts *src);
int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts);
Expand Down
2 changes: 1 addition & 1 deletion net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
return skb->len;
}

void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts)
void tcf_exts_destroy(struct tcf_exts *exts)
{
#ifdef CONFIG_NET_CLS_ACT
tcf_action_destroy(&exts->actions, TCA_ACT_UNBIND);
Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void basic_delete_filter(struct rcu_head *head)
struct tcf_proto *tp = f->tp;

tcf_unbind_filter(tp, &f->res);
tcf_exts_destroy(tp, &f->exts);
tcf_exts_destroy(&f->exts);
tcf_em_tree_destroy(tp, &f->ematches);
kfree(f);
}
Expand Down Expand Up @@ -161,7 +161,7 @@ static int basic_set_parms(struct net *net, struct tcf_proto *tp,

return 0;
errout:
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int cls_bpf_init(struct tcf_proto *tp)
static void cls_bpf_delete_prog(struct tcf_proto *tp, struct cls_bpf_prog *prog)
{
tcf_unbind_filter(tp, &prog->res);
tcf_exts_destroy(tp, &prog->exts);
tcf_exts_destroy(&prog->exts);

bpf_prog_destroy(prog->filter);

Expand Down Expand Up @@ -217,7 +217,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
errout_free:
kfree(bpf_ops);
errout:
tcf_exts_destroy(tp, &exts);
tcf_exts_destroy(&exts);
return ret;
}

Expand Down
6 changes: 3 additions & 3 deletions net/sched/cls_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void cls_cgroup_destroy_rcu(struct rcu_head *root)
struct cls_cgroup_head,
rcu);

tcf_exts_destroy(head->tp, &head->exts);
tcf_exts_destroy(&head->exts);
tcf_em_tree_destroy(head->tp, &head->ematches);
kfree(head);
}
Expand Down Expand Up @@ -135,7 +135,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,

err = tcf_em_tree_validate(tp, tb[TCA_CGROUP_EMATCHES], &t);
if (err < 0) {
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
goto errout;
}

Expand All @@ -156,7 +156,7 @@ static void cls_cgroup_destroy(struct tcf_proto *tp)
struct cls_cgroup_head *head = rtnl_dereference(tp->root);

if (head) {
tcf_exts_destroy(tp, &head->exts);
tcf_exts_destroy(&head->exts);
tcf_em_tree_destroy(tp, &head->ematches);
RCU_INIT_POINTER(tp->root, NULL);
kfree_rcu(head, rcu);
Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static void flow_destroy_filter(struct rcu_head *head)
struct flow_filter *f = container_of(head, struct flow_filter, rcu);

del_timer_sync(&f->perturb_timer);
tcf_exts_destroy(f->tp, &f->exts);
tcf_exts_destroy(&f->exts);
tcf_em_tree_destroy(f->tp, &f->ematches);
kfree(f);
}
Expand Down Expand Up @@ -533,7 +533,7 @@ static int flow_change(struct net *net, struct sk_buff *in_skb,
tcf_em_tree_destroy(tp, &t);
kfree(fnew);
err1:
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void fw_delete_filter(struct rcu_head *head)
struct tcf_proto *tp = f->tp;

tcf_unbind_filter(tp, &f->res);
tcf_exts_destroy(tp, &f->exts);
tcf_exts_destroy(&f->exts);
kfree(f);
}

Expand Down Expand Up @@ -223,7 +223,7 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,

return 0;
errout:
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ route4_delete_filter(struct rcu_head *head)
struct tcf_proto *tp = f->tp;

tcf_unbind_filter(tp, &f->res);
tcf_exts_destroy(tp, &f->exts);
tcf_exts_destroy(&f->exts);
kfree(f);
}

Expand Down Expand Up @@ -456,7 +456,7 @@ static int route4_set_parms(struct net *net, struct tcf_proto *tp,

return 0;
errout:
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_rsvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void
rsvp_delete_filter(struct tcf_proto *tp, struct rsvp_filter *f)
{
tcf_unbind_filter(tp, &f->res);
tcf_exts_destroy(tp, &f->exts);
tcf_exts_destroy(&f->exts);
kfree_rcu(f, rcu);
}

Expand Down Expand Up @@ -577,7 +577,7 @@ static int rsvp_change(struct net *net, struct sk_buff *in_skb,
errout:
kfree(f);
errout2:
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_tcindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ tcindex_delete(struct tcf_proto *tp, unsigned long arg)
rcu_assign_pointer(*walk, rtnl_dereference(f->next));
}
tcf_unbind_filter(tp, &r->res);
tcf_exts_destroy(tp, &r->exts);
tcf_exts_destroy(&r->exts);
if (f)
kfree_rcu(f, rcu);
return 0;
Expand Down Expand Up @@ -401,7 +401,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
kfree(cp->h);
errout:
kfree(cp);
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static int u32_destroy_key(struct tcf_proto *tp,
bool free_pf)
{
tcf_unbind_filter(tp, &n->res);
tcf_exts_destroy(tp, &n->exts);
tcf_exts_destroy(&n->exts);
if (n->ht_down)
n->ht_down->refcnt--;
#ifdef CONFIG_CLS_U32_PERF
Expand Down Expand Up @@ -606,7 +606,7 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp,

return 0;
errout:
tcf_exts_destroy(tp, &e);
tcf_exts_destroy(&e);
return err;
}

Expand Down

0 comments on commit 18d0264

Please sign in to comment.