Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 965e2adc authored by Eric Dumazet's avatar Eric Dumazet Committed by Greg Kroah-Hartman
Browse files

inet: frags: remove inet_frag_maybe_warn_overflow()



This function is obsolete, after rhashtable addition to inet defrag.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit 2d44ed22e607f9a285b049de2263e3840673a260)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 49106f36
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -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_kill(struct inet_frag_queue *q);
void inet_frag_destroy(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);
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)
static inline void inet_frag_put(struct inet_frag_queue *q)
{
{
+2 −3
Original line number Original line Diff line number Diff line
@@ -83,10 +83,9 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb,
	struct inet_frag_queue *q;
	struct inet_frag_queue *q;


	q = inet_frag_find(&ieee802154_lowpan->frags, &key);
	q = inet_frag_find(&ieee802154_lowpan->frags, &key);
	if (IS_ERR_OR_NULL(q)) {
	if (!q)
		inet_frag_maybe_warn_overflow(q, pr_fmt());
		return NULL;
		return NULL;
	}

	return container_of(q, struct lowpan_frag_queue, q);
	return container_of(q, struct lowpan_frag_queue, q);
}
}


+0 −11
Original line number Original line Diff line number Diff line
@@ -217,14 +217,3 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key)
	return inet_frag_create(nf, key);
	return inet_frag_create(nf, key);
}
}
EXPORT_SYMBOL(inet_frag_find);
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);
+2 −3
Original line number Original line Diff line number Diff line
@@ -219,10 +219,9 @@ static struct ipq *ip_find(struct net *net, struct iphdr *iph,
	struct inet_frag_queue *q;
	struct inet_frag_queue *q;


	q = inet_frag_find(&net->ipv4.frags, &key);
	q = inet_frag_find(&net->ipv4.frags, &key);
	if (IS_ERR_OR_NULL(q)) {
	if (!q)
		inet_frag_maybe_warn_overflow(q, pr_fmt());
		return NULL;
		return NULL;
	}

	return container_of(q, struct ipq, q);
	return container_of(q, struct ipq, q);
}
}


+2 −3
Original line number Original line Diff line number Diff line
@@ -177,10 +177,9 @@ static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
	struct inet_frag_queue *q;
	struct inet_frag_queue *q;


	q = inet_frag_find(&net->nf_frag.frags, &key);
	q = inet_frag_find(&net->nf_frag.frags, &key);
	if (IS_ERR_OR_NULL(q)) {
	if (!q)
		inet_frag_maybe_warn_overflow(q, pr_fmt());
		return NULL;
		return NULL;
	}

	return container_of(q, struct frag_queue, q);
	return container_of(q, struct frag_queue, q);
}
}


Loading