[<prev] [next>] [day] [month] [year] [list]
Message-ID: <157252289377.29376.5021804327399438080.tip-bot2@tip-bot2>
Date: Thu, 31 Oct 2019 11:54:53 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
"David S. Miller" <davem@...emloft.net>,
<netfilter-devel@...r.kernel.org>, <coreteam@...filter.org>,
<netdev@...r.kernel.org>, Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org
Subject: [tip: core/rcu] net/netfilter: Replace rcu_swap_protected() with
rcu_replace_pointer()
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: b685b534bf1586a01b32280d1da39febaf270039
Gitweb: https://git.kernel.org/tip/b685b534bf1586a01b32280d1da39febaf270039
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Mon, 23 Sep 2019 15:53:02 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Wed, 30 Oct 2019 08:45:38 -07:00
net/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer()
This commit replaces the use of rcu_swap_protected() with the more
intuitively appealing rcu_replace_pointer() as a step towards removing
rcu_swap_protected().
Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/
Reported-by: Linus Torvalds <torvalds@...ux-foundation.org>
[ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ]
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
Acked-by: Pablo Neira Ayuso <pablo@...filter.org>
Cc: Jozsef Kadlecsik <kadlec@...filter.org>
Cc: Florian Westphal <fw@...len.de>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: <netfilter-devel@...r.kernel.org>
Cc: <coreteam@...filter.org>
Cc: <netdev@...r.kernel.org>
---
net/netfilter/nf_tables_api.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index d481f9b..3379974 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1461,8 +1461,9 @@ static void nft_chain_stats_replace(struct nft_trans *trans)
if (!nft_trans_chain_stats(trans))
return;
- rcu_swap_protected(chain->stats, nft_trans_chain_stats(trans),
- lockdep_commit_lock_is_held(trans->ctx.net));
+ nft_trans_chain_stats(trans) =
+ rcu_replace_pointer(chain->stats, nft_trans_chain_stats(trans),
+ lockdep_commit_lock_is_held(trans->ctx.net));
if (!nft_trans_chain_stats(trans))
static_branch_inc(&nft_counters_enabled);
Powered by blists - more mailing lists