drm/nv50: use alternate source of SOR_MODE_CTRL for DP hack
[safe/jmp/linux-2.6] / net / ipv4 / ip_output.c
index 322b408..d1bcc9f 100644 (file)
@@ -51,6 +51,7 @@
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/highmem.h>
+#include <linux/slab.h>
 
 #include <linux/socket.h>
 #include <linux/sockios.h>
@@ -119,7 +120,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb)
        newskb->pkt_type = PACKET_LOOPBACK;
        newskb->ip_summed = CHECKSUM_UNNECESSARY;
        WARN_ON(!skb_dst(newskb));
-       netif_rx(newskb);
+       netif_rx_ni(newskb);
        return 0;
 }
 
@@ -254,7 +255,7 @@ int ip_mc_output(struct sk_buff *skb)
         */
 
        if (rt->rt_flags&RTCF_MULTICAST) {
-               if ((!sk || inet_sk(sk)->mc_loop)
+               if (sk_mc_loop(sk)
 #ifdef CONFIG_IP_MROUTE
                /* Small optimization: do not loopback not local frames,
                   which returned after forwarding; they will be  dropped
@@ -264,9 +265,11 @@ int ip_mc_output(struct sk_buff *skb)
 
                   This check is duplicated in ip_mr_input at the moment.
                 */
-                   && ((rt->rt_flags&RTCF_LOCAL) || !(IPCB(skb)->flags&IPSKB_FORWARDED))
+                   &&
+                   ((rt->rt_flags & RTCF_LOCAL) ||
+                    !(IPCB(skb)->flags & IPSKB_FORWARDED))
 #endif
-               ) {
+                  ) {
                        struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC);
                        if (newskb)
                                NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb,
@@ -501,8 +504,8 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
                        if (skb->sk) {
                                frag->sk = skb->sk;
                                frag->destructor = sock_wfree;
-                               truesizes += frag->truesize;
                        }
+                       truesizes += frag->truesize;
                }
 
                /* Everything is OK. Generate! */