OSDN Git Service

inet: frags: remove inet_frag_maybe_warn_overflow()
authorEric Dumazet <edumazet@google.com>
Wed, 10 Oct 2018 19:29:59 +0000 (12:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Feb 2019 10:25:31 +0000 (11:25 +0100)
commit 2d44ed22e607f9a285b049de2263e3840673a260 upstream.

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>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 6eb9f7c..a9453d9 100644 (file)
@@ -109,8 +109,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 510568c..c5ad89f 100644 (file)
@@ -83,10 +83,9 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb,
        key.dst = *dst;
 
        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 cca7362..bb784c3 100644 (file)
@@ -225,14 +225,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 e0465ad..c6711b0 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 985a9b6..41c6639 100644 (file)
@@ -184,10 +184,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 0076d7a..1ab32ff 100644 (file)
@@ -154,10 +154,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);
 }