]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfrm: policy: remove last remnants of pernet inexact list
authorFlorian Westphal <fw@strlen.de>
Wed, 18 Sep 2024 09:12:49 +0000 (11:12 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 24 Sep 2024 07:58:16 +0000 (09:58 +0200)
xfrm_net still contained the no-longer-used inexact policy list heads,
remove them.

Fixes: a54ad727f745 ("xfrm: policy: remove remaining use of inexact list")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/netns/xfrm.h
net/xfrm/xfrm_policy.c

index d489d9250bff9e3116e9423d4959fae2a94ccb1e..ae60d66640954c8f354c298a8aa0a59dbb5387e8 100644 (file)
@@ -51,7 +51,6 @@ struct netns_xfrm {
        struct hlist_head       *policy_byidx;
        unsigned int            policy_idx_hmask;
        unsigned int            idx_generator;
-       struct hlist_head       policy_inexact[XFRM_POLICY_MAX];
        struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX];
        unsigned int            policy_count[XFRM_POLICY_MAX * 2];
        struct work_struct      policy_hash_work;
index 55cc9f4cb42ba2a300bc2c2b8cf4a7c8644ba481..a2ea9dbac90b36fefd6a7d3978ae51854de82553 100644 (file)
@@ -4206,7 +4206,6 @@ static int __net_init xfrm_policy_init(struct net *net)
 
                net->xfrm.policy_count[dir] = 0;
                net->xfrm.policy_count[XFRM_POLICY_MAX + dir] = 0;
-               INIT_HLIST_HEAD(&net->xfrm.policy_inexact[dir]);
 
                htab = &net->xfrm.policy_bydst[dir];
                htab->table = xfrm_hash_alloc(sz);
@@ -4260,8 +4259,6 @@ static void xfrm_policy_fini(struct net *net)
        for (dir = 0; dir < XFRM_POLICY_MAX; dir++) {
                struct xfrm_policy_hash *htab;
 
-               WARN_ON(!hlist_empty(&net->xfrm.policy_inexact[dir]));
-
                htab = &net->xfrm.policy_bydst[dir];
                sz = (htab->hmask + 1) * sizeof(struct hlist_head);
                WARN_ON(!hlist_empty(htab->table));