]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
inet: frags: remove inet_frag_maybe_warn_overflow()
authorEric Dumazet <edumazet@google.com>
Thu, 13 Sep 2018 14:58:44 +0000 (07:58 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:48:02 +0000 (19:48 -0600)
BugLink: https://bugs.launchpad.net/bugs/1836117
This function is obsolete, after rhashtable addition to inet defrag.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2d44ed22e607f9a285b049de2263e3840673a260)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/net/inet_frag.h
net/ieee802154/6lowpan/reassembly.c
net/ipv4/inet_fragment.c
net/ipv4/ip_fragment.c
net/ipv6/netfilter/nf_conntrack_reasm.c
net/ipv6/reassembly.c

index 0e8e159d88f7f77254fae5a49f1c7ba07b967e11..95e353e3305b43253084d972e32538138bcc5454 100644 (file)
@@ -110,8 +110,6 @@ void inet_frags_exit_net(struct netns_frags *nf);
 void inet_frag_kill(struct inet_frag_queue *q);
 void inet_frag_destroy(struct inet_frag_queue *q);
 struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key);
-void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
-                                  const char *prefix);
 
 static inline void inet_frag_put(struct inet_frag_queue *q)
 {
index 0fa0121f85d4531751566c26e18cc2a23c017da6..1aec71a3f90478a29065e6559a78aec2e930ceab 100644 (file)
@@ -84,10 +84,9 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb,
        struct inet_frag_queue *q;
 
        q = inet_frag_find(&ieee802154_lowpan->frags, &key);
-       if (IS_ERR_OR_NULL(q)) {
-               inet_frag_maybe_warn_overflow(q, pr_fmt());
+       if (!q)
                return NULL;
-       }
+
        return container_of(q, struct lowpan_frag_queue, q);
 }
 
index 9a69814b54fdaed42f895c7c0a381759123c2e5e..d53f55ad9d38c3bf6989f4a1d3379da1f3206ced 100644 (file)
@@ -216,14 +216,3 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key)
        return inet_frag_create(nf, key);
 }
 EXPORT_SYMBOL(inet_frag_find);
-
-void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
-                                  const char *prefix)
-{
-       static const char msg[] = "inet_frag_find: Fragment hash bucket"
-               " list length grew over limit. Dropping fragment.\n";
-
-       if (PTR_ERR(q) == -ENOBUFS)
-               net_dbg_ratelimited("%s%s", prefix, msg);
-}
-EXPORT_SYMBOL(inet_frag_maybe_warn_overflow);
index c0f8d27d0ba0b48b8b5f69c268333e7e60443939..36b0db7e8e3c198f20d2b8b5431765075de4164f 100644 (file)
@@ -221,10 +221,9 @@ static struct ipq *ip_find(struct net *net, struct iphdr *iph,
        struct inet_frag_queue *q;
 
        q = inet_frag_find(&net->ipv4.frags, &key);
-       if (IS_ERR_OR_NULL(q)) {
-               inet_frag_maybe_warn_overflow(q, pr_fmt());
+       if (!q)
                return NULL;
-       }
+
        return container_of(q, struct ipq, q);
 }
 
index 8b12431ae29613b4370a066639eac3fce3d5a41d..54ce1d2a9a9dd0ef3ce5b87a86aa573cafab6f5c 100644 (file)
@@ -178,10 +178,9 @@ static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
        struct inet_frag_queue *q;
 
        q = inet_frag_find(&net->nf_frag.frags, &key);
-       if (IS_ERR_OR_NULL(q)) {
-               inet_frag_maybe_warn_overflow(q, pr_fmt());
+       if (!q)
                return NULL;
-       }
+
        return container_of(q, struct frag_queue, q);
 }
 
index 70acad126d044a0f6a1efc63f307805fcf7b1df9..2a77fda5e3bca1b6ce8c24df11e741653a15c665 100644 (file)
@@ -155,10 +155,9 @@ fq_find(struct net *net, __be32 id, const struct ipv6hdr *hdr, int iif)
                key.iif = 0;
 
        q = inet_frag_find(&net->ipv6.frags, &key);
-       if (IS_ERR_OR_NULL(q)) {
-               inet_frag_maybe_warn_overflow(q, pr_fmt());
+       if (!q)
                return NULL;
-       }
+
        return container_of(q, struct frag_queue, q);
 }