Merge tag 'backlight-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / net / sched / act_police.c
index 0fab8de..832157a 100644 (file)
@@ -48,11 +48,11 @@ static const struct nla_policy police_policy[TCA_POLICE_MAX + 1] = {
 
 static int tcf_police_init(struct net *net, struct nlattr *nla,
                               struct nlattr *est, struct tc_action **a,
-                              int ovr, int bind, bool rtnl_held,
                               struct tcf_proto *tp, u32 flags,
                               struct netlink_ext_ack *extack)
 {
        int ret = 0, tcfp_result = TC_ACT_OK, err, size;
+       bool bind = flags & TCA_ACT_FLAGS_BIND;
        struct nlattr *tb[TCA_POLICE_MAX + 1];
        struct tcf_chain *goto_ch = NULL;
        struct tc_police *parm;
@@ -97,7 +97,7 @@ static int tcf_police_init(struct net *net, struct nlattr *nla,
                }
                ret = ACT_P_CREATED;
                spin_lock_init(&(to_police(*a)->tcfp_lock));
-       } else if (!ovr) {
+       } else if (!(flags & TCA_ACT_FLAGS_REPLACE)) {
                tcf_idr_release(*a, bind);
                return -EEXIST;
        }