aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2019-09-23 16:09:18 -0700
committerPaul E. McKenney <paulmck@kernel.org>2019-10-30 08:45:48 -0700
commit445d3749315f34229dcfc3efd82796f97fc72e92 (patch)
tree29d6d560a389ce60f746abcd458f3ea627ba92a0 /net/sched/act_police.c
parentnet/netfilter: Replace rcu_swap_protected() with rcu_replace_pointer() (diff)
downloadlinux-dev-445d3749315f34229dcfc3efd82796f97fc72e92.tar.xz
linux-dev-445d3749315f34229dcfc3efd82796f97fc72e92.zip
net/sched: 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@linux-foundation.org> [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Jiri Pirko <jiri@resnulli.us> Cc: "David S. Miller" <davem@davemloft.net> Cc: <netdev@vger.kernel.org> Cc: <linux-kernel@vger.kernel.org>
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r--net/sched/act_police.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 89c04c52af3d..caa91cf8791b 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -191,9 +191,9 @@ static int tcf_police_init(struct net *net, struct nlattr *nla,
police->tcfp_ptoks = new->tcfp_mtu_ptoks;
spin_unlock_bh(&police->tcfp_lock);
goto_ch = tcf_action_set_ctrlact(*a, parm->action, goto_ch);
- rcu_swap_protected(police->params,
- new,
- lockdep_is_held(&police->tcf_lock));
+ new = rcu_replace_pointer(police->params,
+ new,
+ lockdep_is_held(&police->tcf_lock));
spin_unlock_bh(&police->tcf_lock);
if (goto_ch)