Skip to content

Commit 9be02dd

Browse files
roidayankuba-moo
authored andcommitted
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: Roi Dayan <[email protected]> Reviewed-by: Paul Blakey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e542d29 commit 9be02dd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

net/sched/act_ct.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,7 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
991991

992992
/* Associate skb with specified zone. */
993993
if (tmpl) {
994-
ct = nf_ct_get(skb, &ctinfo);
995-
if (skb_nfct(skb))
996-
nf_conntrack_put(skb_nfct(skb));
994+
nf_conntrack_put(skb_nfct(skb));
997995
nf_conntrack_get(&tmpl->ct_general);
998996
nf_ct_set(skb, tmpl, IP_CT_NEW);
999997
}

0 commit comments

Comments
 (0)