diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-08-04 14:28:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-04 11:21:23 -0700 |
commit | 4ebc1e3cfcd8778e2150bdb799b19e85348b8efa (patch) | |
tree | 1f62e37970989aaf7e5ededdd81404d34cb05dd7 /net/sched/cls_flow.c | |
parent | f7ebdff7575c3a5c099c8b1d661b0a65f4c6f10f (diff) |
net: sched: remove unneeded tcf_em_tree_change
Since tcf_em_tree_validate could be always called on a newly created
filter, there is no need for this change function.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_flow.c')
-rw-r--r-- | net/sched/cls_flow.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 3065752b9cda..71fd1af01726 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c @@ -389,7 +389,6 @@ static int flow_change(struct net *net, struct sk_buff *in_skb, struct nlattr *opt = tca[TCA_OPTIONS]; struct nlattr *tb[TCA_FLOW_MAX + 1]; struct tcf_exts e; - struct tcf_ematch_tree t; unsigned int nkeys = 0; unsigned int perturb_period = 0; u32 baseclass = 0; @@ -432,13 +431,13 @@ static int flow_change(struct net *net, struct sk_buff *in_skb, if (err < 0) goto err1; - err = tcf_em_tree_validate(tp, tb[TCA_FLOW_EMATCHES], &t); - if (err < 0) - goto err1; - err = -ENOBUFS; fnew = kzalloc(sizeof(*fnew), GFP_KERNEL); if (!fnew) + goto err1; + + err = tcf_em_tree_validate(tp, tb[TCA_FLOW_EMATCHES], &fnew->ematches); + if (err < 0) goto err2; err = tcf_exts_init(&fnew->exts, TCA_FLOW_ACT, TCA_FLOW_POLICE); @@ -512,7 +511,6 @@ static int flow_change(struct net *net, struct sk_buff *in_skb, (unsigned long)fnew); tcf_exts_change(tp, &fnew->exts, &e); - tcf_em_tree_change(tp, &fnew->ematches, &t); netif_keep_dst(qdisc_dev(tp->q)); @@ -554,8 +552,8 @@ static int flow_change(struct net *net, struct sk_buff *in_skb, err3: tcf_exts_destroy(&fnew->exts); + tcf_em_tree_destroy(&fnew->ematches); err2: - tcf_em_tree_destroy(&t); kfree(fnew); err1: tcf_exts_destroy(&e); |