]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/core/netpoll.c
net: convert sk_buff.users from atomic_t to refcount_t
[mirror_ubuntu-artful-kernel.git] / net / core / netpoll.c
index 29be2466970cd670daa7a8abdd54929c9af39026..a835155c85f9ec7c01b0bd8efc879ade3d733d7b 100644 (file)
@@ -277,7 +277,7 @@ static void zap_completion_queue(void)
                        struct sk_buff *skb = clist;
                        clist = clist->next;
                        if (!skb_irq_freeable(skb)) {
-                               atomic_inc(&skb->users);
+                               refcount_inc(&skb->users);
                                dev_kfree_skb_any(skb); /* put this one back */
                        } else {
                                __kfree_skb(skb);
@@ -309,7 +309,7 @@ repeat:
                return NULL;
        }
 
-       atomic_set(&skb->users, 1);
+       refcount_set(&skb->users, 1);
        skb_reserve(skb, reserve);
        return skb;
 }
@@ -441,7 +441,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
                ip6h->saddr = np->local_ip.in6;
                ip6h->daddr = np->remote_ip.in6;
 
-               eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
+               eth = skb_push(skb, ETH_HLEN);
                skb_reset_mac_header(skb);
                skb->protocol = eth->h_proto = htons(ETH_P_IPV6);
        } else {
@@ -470,7 +470,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
                put_unaligned(np->remote_ip.ip, &(iph->daddr));
                iph->check    = ip_fast_csum((unsigned char *)iph, iph->ihl);
 
-               eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
+               eth = skb_push(skb, ETH_HLEN);
                skb_reset_mac_header(skb);
                skb->protocol = eth->h_proto = htons(ETH_P_IP);
        }