diff options
author | Jiri Pirko <jiri@mellanox.com> | 2020-04-27 18:13:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-27 12:43:29 -0700 |
commit | 6c8cd435b58780ded6e3e06d722249ec181efb36 (patch) | |
tree | c63ce25cc0e01c5c43e87c94b16a32aaf08919b9 /drivers | |
parent | d7fcc986224d77c4ab66f436e7eaa11170c509af (diff) | |
download | linux-6c8cd435b58780ded6e3e06d722249ec181efb36.tar.bz2 |
mlxsw: spectrum_acl: Use block variable in mlxsw_sp_acl_rule_del()
On couple of places in mlxsw_sp_acl_rule_del(), block variable is not
used directly as it could be. So do it.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c index 800eaa6be3c0..c61f78e30397 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c @@ -704,14 +704,13 @@ void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp, block->egress_blocker_rule_count -= rule->rulei->egress_bind_blocker; block->ingress_blocker_rule_count -= rule->rulei->ingress_bind_blocker; - ruleset->ht_key.block->rule_count--; + block->rule_count--; mutex_lock(&mlxsw_sp->acl->rules_lock); list_del(&rule->list); mutex_unlock(&mlxsw_sp->acl->rules_lock); if (!ruleset->ht_key.chain_index && mlxsw_sp_acl_ruleset_is_singular(ruleset)) - mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset, - ruleset->ht_key.block); + mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset, block); rhashtable_remove_fast(&ruleset->rule_ht, &rule->ht_node, mlxsw_sp_acl_rule_ht_params); ops->rule_del(mlxsw_sp, rule->priv); |