Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Link: https://lore.kernel.org/r/20210428060532.3330974-1-roid@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Roi Dayan and committed by
Jakub Kicinski
9be02dd3 e542d29c

+1 -3
+1 -3
net/sched/act_ct.c
··· 991 991 992 992 /* Associate skb with specified zone. */ 993 993 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)); 997 995 nf_conntrack_get(&tmpl->ct_general); 998 996 nf_ct_set(skb, tmpl, IP_CT_NEW); 999 997 }