Skip to content

Commit 2d44ed2

Browse files
edumazetdavem330
authored andcommitted
inet: frags: remove inet_frag_maybe_warn_overflow()
This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 399d140 commit 2d44ed2

File tree

6 files changed

+8
-25
lines changed

6 files changed

+8
-25
lines changed

include/net/inet_frag.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ void inet_frags_exit_net(struct netns_frags *nf);
110110
void inet_frag_kill(struct inet_frag_queue *q);
111111
void inet_frag_destroy(struct inet_frag_queue *q);
112112
struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key);
113-
void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
114-
const char *prefix);
115113

116114
static inline void inet_frag_put(struct inet_frag_queue *q)
117115
{

net/ieee802154/6lowpan/reassembly.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb,
8484
struct inet_frag_queue *q;
8585

8686
q = inet_frag_find(&ieee802154_lowpan->frags, &key);
87-
if (IS_ERR_OR_NULL(q)) {
88-
inet_frag_maybe_warn_overflow(q, pr_fmt());
87+
if (!q)
8988
return NULL;
90-
}
89+
9190
return container_of(q, struct lowpan_frag_queue, q);
9291
}
9392

net/ipv4/inet_fragment.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,3 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key)
218218
return inet_frag_create(nf, key);
219219
}
220220
EXPORT_SYMBOL(inet_frag_find);
221-
222-
void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
223-
const char *prefix)
224-
{
225-
static const char msg[] = "inet_frag_find: Fragment hash bucket"
226-
" list length grew over limit. Dropping fragment.\n";
227-
228-
if (PTR_ERR(q) == -ENOBUFS)
229-
net_dbg_ratelimited("%s%s", prefix, msg);
230-
}
231-
EXPORT_SYMBOL(inet_frag_maybe_warn_overflow);

net/ipv4/ip_fragment.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ static struct ipq *ip_find(struct net *net, struct iphdr *iph,
221221
struct inet_frag_queue *q;
222222

223223
q = inet_frag_find(&net->ipv4.frags, &key);
224-
if (IS_ERR_OR_NULL(q)) {
225-
inet_frag_maybe_warn_overflow(q, pr_fmt());
224+
if (!q)
226225
return NULL;
227-
}
226+
228227
return container_of(q, struct ipq, q);
229228
}
230229

net/ipv6/netfilter/nf_conntrack_reasm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,9 @@ static struct frag_queue *fq_find(struct net *net, __be32 id, u32 user,
178178
struct inet_frag_queue *q;
179179

180180
q = inet_frag_find(&net->nf_frag.frags, &key);
181-
if (IS_ERR_OR_NULL(q)) {
182-
inet_frag_maybe_warn_overflow(q, pr_fmt());
181+
if (!q)
183182
return NULL;
184-
}
183+
185184
return container_of(q, struct frag_queue, q);
186185
}
187186

net/ipv6/reassembly.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@ fq_find(struct net *net, __be32 id, const struct ipv6hdr *hdr, int iif)
155155
key.iif = 0;
156156

157157
q = inet_frag_find(&net->ipv6.frags, &key);
158-
if (IS_ERR_OR_NULL(q)) {
159-
inet_frag_maybe_warn_overflow(q, pr_fmt());
158+
if (!q)
160159
return NULL;
161-
}
160+
162161
return container_of(q, struct frag_queue, q);
163162
}
164163

0 commit comments

Comments
 (0)