Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / net / sched / act_police.c
index 7437b001f493027eaeeeb193a39543c18f16a62c..8b7a0ac96c5169e833c6f87898c6503a49c726af 100644 (file)
@@ -87,7 +87,7 @@ static int tcf_police_init(struct net *net, struct nlattr *nla,
 
        if (!exists) {
                ret = tcf_idr_create(tn, index, NULL, a,
-                                    &act_police_ops, bind, true);
+                                    &act_police_ops, bind, true, 0);
                if (ret) {
                        tcf_idr_cleanup(tn, index);
                        return ret;
@@ -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)