@@ -8548,25 +8548,10 @@ static void nft_unregister_flowtable_hook(struct net *net,
FLOW_BLOCK_UNBIND);
}
-static void __nft_unregister_flowtable_net_hooks(struct net *net,
- struct list_head *hook_list,
- bool release_netdev)
-{
- struct nft_hook *hook, *next;
-
- list_for_each_entry_safe(hook, next, hook_list, list) {
- nf_unregister_net_hook(net, &hook->ops);
- if (release_netdev) {
- list_del(&hook->list);
- kfree_rcu(hook, rcu);
- }
- }
-}
-
static void nft_unregister_flowtable_net_hooks(struct net *net,
struct list_head *hook_list)
{
- __nft_unregister_flowtable_net_hooks(net, hook_list, false);
+ nft_netdev_unregister_hooks(net, hook_list, false);
}
static int nft_register_flowtable_net_hooks(struct net *net,
@@ -11439,8 +11424,7 @@ static void __nft_release_hook(struct net *net, struct nft_table *table)
list_for_each_entry(chain, &table->chains, list)
__nf_tables_unregister_hook(net, table, chain, true);
list_for_each_entry(flowtable, &table->flowtables, list)
- __nft_unregister_flowtable_net_hooks(net, &flowtable->hook_list,
- true);
+ nft_netdev_unregister_hooks(net, &flowtable->hook_list, true);
}
static void __nft_release_hooks(struct net *net)
The function is a 1:1 copy of nft_netdev_unregister_hooks(), use the latter in its place. Signed-off-by: Phil Sutter <phil@nwl.cc> --- net/netfilter/nf_tables_api.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-)