Commit 9be02dd3 authored by Roi Dayan's avatar Roi Dayan Committed by Jakub Kicinski

net/sched: act_ct: Remove redundant ct get and check

The assignment is not being used and redundant.
The check for null is redundant as nf_conntrack_put() also
checks this.
Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Reviewed-by: default avatarPaul Blakey <paulb@nvidia.com>
Link: https://lore.kernel.org/r/20210428060532.3330974-1-roid@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e542d29c
......@@ -991,9 +991,7 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
/* Associate skb with specified zone. */
if (tmpl) {
ct = nf_ct_get(skb, &ctinfo);
if (skb_nfct(skb))
nf_conntrack_put(skb_nfct(skb));
nf_conntrack_put(skb_nfct(skb));
nf_conntrack_get(&tmpl->ct_general);
nf_ct_set(skb, tmpl, IP_CT_NEW);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment