netfilter: nf_tables: rename function to destroy hook list
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 20 Apr 2023 22:34:30 +0000 (00:34 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 21 Apr 2023 23:39:42 +0000 (01:39 +0200)
Rename nft_flowtable_hooks_destroy() by nft_hooks_destroy() to prepare
for netdev chain device updates.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index 3f95fb2..77975b4 100644 (file)
@@ -7771,7 +7771,7 @@ err_unregister_net_hooks:
        return err;
 }
 
-static void nft_flowtable_hooks_destroy(struct list_head *hook_list)
+static void nft_hooks_destroy(struct list_head *hook_list)
 {
        struct nft_hook *hook, *next;
 
@@ -7952,7 +7952,7 @@ static int nf_tables_newflowtable(struct sk_buff *skb,
                                               &flowtable->hook_list,
                                               flowtable);
        if (err < 0) {
-               nft_flowtable_hooks_destroy(&flowtable->hook_list);
+               nft_hooks_destroy(&flowtable->hook_list);
                goto err4;
        }
 
@@ -8789,7 +8789,7 @@ static void nft_commit_release(struct nft_trans *trans)
        case NFT_MSG_DELFLOWTABLE:
        case NFT_MSG_DESTROYFLOWTABLE:
                if (nft_trans_flowtable_update(trans))
-                       nft_flowtable_hooks_destroy(&nft_trans_flowtable_hooks(trans));
+                       nft_hooks_destroy(&nft_trans_flowtable_hooks(trans));
                else
                        nf_tables_flowtable_destroy(nft_trans_flowtable(trans));
                break;
@@ -9440,7 +9440,7 @@ static void nf_tables_abort_release(struct nft_trans *trans)
                break;
        case NFT_MSG_NEWFLOWTABLE:
                if (nft_trans_flowtable_update(trans))
-                       nft_flowtable_hooks_destroy(&nft_trans_flowtable_hooks(trans));
+                       nft_hooks_destroy(&nft_trans_flowtable_hooks(trans));
                else
                        nf_tables_flowtable_destroy(nft_trans_flowtable(trans));
                break;