[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210428060532.3330974-1-roid@nvidia.com>
Date: Wed, 28 Apr 2021 09:05:32 +0300
From: Roi Dayan <roid@...dia.com>
To: <netdev@...r.kernel.org>
CC: Paul Blakey <paulb@...dia.com>, Roi Dayan <roid@...dia.com>
Subject: [PATCH net-next 1/1] 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@...dia.com>
Reviewed-by: Paul Blakey <paulb@...dia.com>
---
net/sched/act_ct.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 16e888a9601d..65e9ffe6cf7d 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -990,9 +990,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);
}
--
2.26.2
Powered by blists - more mailing lists