]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
net; ipv[46] - Remove 2 unnecessary NETDEBUG OOM messages
authorJoe Perches <joe@perches.com>
Wed, 5 Nov 2014 22:39:21 +0000 (14:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Nov 2014 20:11:10 +0000 (15:11 -0500)
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: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv6/ip6_output.c

index bc6471d4abcdaa464d9effc244c5f1bdcb989681..4a929adf2ab7a5ef6923ffe504ae33669ee97242 100644 (file)
@@ -662,12 +662,10 @@ slow_path:
                if (len < left) {
                        len &= ~7;
                }
-               /*
-                *      Allocate buffer.
-                */
 
-               if ((skb2 = alloc_skb(len+hlen+ll_rs, GFP_ATOMIC)) == NULL) {
-                       NETDEBUG(KERN_INFO "IP: frag: no memory for new fragment!\n");
+               /* Allocate buffer */
+               skb2 = alloc_skb(len + hlen + ll_rs, GFP_ATOMIC);
+               if (!skb2) {
                        err = -ENOMEM;
                        goto fail;
                }
index 8e950c250ada0785323c3e270a61c2e1b7a7b6f3..916d2a166a9b7b02a679d8e8ddafaa45b4878932 100644 (file)
@@ -747,13 +747,11 @@ slow_path:
                if (len < left) {
                        len &= ~7;
                }
-               /*
-                *      Allocate buffer.
-                */
 
-               if ((frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) +
-                                     hroom + troom, GFP_ATOMIC)) == NULL) {
-                       NETDEBUG(KERN_INFO "IPv6: frag: no memory for new fragment!\n");
+               /* Allocate buffer */
+               frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) +
+                                hroom + troom, GFP_ATOMIC);
+               if (!frag) {
                        IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
                                      IPSTATS_MIB_FRAGFAILS);
                        err = -ENOMEM;