Commit cbffccc9 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net; ipv[46] - Remove 2 unnecessary NETDEBUG OOM messages

These messages aren't useful as there's a generic dump_stack()
on OOM.

Neaten the comment and if test above the OOM by separating the
assign in if into an allocation then if test.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f03ae5f9
...@@ -662,12 +662,10 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) ...@@ -662,12 +662,10 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
if (len < left) { if (len < left) {
len &= ~7; len &= ~7;
} }
/*
* Allocate buffer.
*/
if ((skb2 = alloc_skb(len+hlen+ll_rs, GFP_ATOMIC)) == NULL) { /* Allocate buffer */
NETDEBUG(KERN_INFO "IP: frag: no memory for new fragment!\n"); skb2 = alloc_skb(len + hlen + ll_rs, GFP_ATOMIC);
if (!skb2) {
err = -ENOMEM; err = -ENOMEM;
goto fail; goto fail;
} }
......
...@@ -747,13 +747,11 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) ...@@ -747,13 +747,11 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
if (len < left) { if (len < left) {
len &= ~7; len &= ~7;
} }
/*
* Allocate buffer.
*/
if ((frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) + /* Allocate buffer */
hroom + troom, GFP_ATOMIC)) == NULL) { frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) +
NETDEBUG(KERN_INFO "IPv6: frag: no memory for new fragment!\n"); hroom + troom, GFP_ATOMIC);
if (!frag) {
IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
IPSTATS_MIB_FRAGFAILS); IPSTATS_MIB_FRAGFAILS);
err = -ENOMEM; err = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment