net/sched: act_ct: Remove redundant ct get and check
Subsystems (3)
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.
Signed-off-by Roi Dayan <[email protected]>
Reviewed-by Paul Blakey <[email protected]>
--- net/sched/act_ct.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/sched/act_ct.c +1 -3
@@ -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
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.Signed-off-by Roi Dayan <[email protected]>Reviewed-by Paul Blakey <[email protected]>[...]
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