Skip to contentSkip to conversation

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

PATCH Applied Roi Dayan 2 participants 2 messages Apr 28, 2021

Subsystems (3)
lore
Share & tools
lore

Roi Dayan

author
#0 lore raw

PATCH 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.

---
 net/sched/act_ct.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/sched/act_ct.c +1 -3
index 16e888a9601d..65e9ffe6cf7d 100644
@@ -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);
 		}
Signature · 1 line
2.26.2
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Wed, 28 Apr 2021 09:05:32 +0300 you wrote:

The assignment is not being used and redundant. The check for null is redundant as nf_conntrack_put() also checks this.

[...]

Here is the summary with links:
- [net-next,1/1] net/sched: act_ct: Remove redundant ct get and check

    https://git.kernel.org/netdev/net-next/c/9be02dd38581

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html