diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2018-07-05 17:24:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-08 06:42:29 +0300 |
commit | 16af6067392c40e454e49eec834843ab03643d96 (patch) | |
tree | 75a30afd8d0c5654eb7795b7e256ea0db0f6c875 /net/sched/cls_api.c | |
parent | b409074e6693bcdaa7abbee2a035f22a9eabda53 (diff) | |
download | linux-16af6067392c40e454e49eec834843ab03643d96.tar.xz |
net: sched: implement reference counted action release
Implement helper delete function that uses new action ops 'delete', instead
of destroying action directly. This is required so act API could delete
actions by index, without holding any references to action that is being
deleted.
Implement function __tcf_action_put() that releases reference to action and
frees it, if necessary. Refactor action deletion code to use new put
function and not to rely on rtnl lock. Remove rtnl lock assertions that are
no longer needed.
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index ebc2b9dd783f..9041f0e43e9a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -1611,7 +1611,6 @@ void tcf_exts_destroy(struct tcf_exts *exts) #ifdef CONFIG_NET_CLS_ACT LIST_HEAD(actions); - ASSERT_RTNL(); tcf_exts_to_list(exts, &actions); tcf_action_destroy(&actions, TCA_ACT_UNBIND); kfree(exts->actions); |