diff options
| -rw-r--r-- | net/ipv4/inet_fragment.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 1e4cf3ab560f..0d70608cc2e1 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
| @@ -157,9 +157,6 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf, | |||
| 157 | { | 157 | { |
| 158 | struct inet_frag_queue *q; | 158 | struct inet_frag_queue *q; |
| 159 | 159 | ||
| 160 | if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) | ||
| 161 | return NULL; | ||
| 162 | |||
| 163 | q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC); | 160 | q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC); |
| 164 | if (!q) | 161 | if (!q) |
| 165 | return NULL; | 162 | return NULL; |
| @@ -204,6 +201,9 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key) | |||
| 204 | { | 201 | { |
| 205 | struct inet_frag_queue *fq; | 202 | struct inet_frag_queue *fq; |
| 206 | 203 | ||
| 204 | if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) | ||
| 205 | return NULL; | ||
| 206 | |||
| 207 | rcu_read_lock(); | 207 | rcu_read_lock(); |
| 208 | 208 | ||
| 209 | fq = rhashtable_lookup(&nf->rhashtable, key, nf->f->rhash_params); | 209 | fq = rhashtable_lookup(&nf->rhashtable, key, nf->f->rhash_params); |
