]> git.karo-electronics.de Git - linux-beck.git/commitdiff
hv_netvsc: Cleanup the test for freeing skb when we use sendbuf mechanism
authorKY Srinivasan <kys@microsoft.com>
Mon, 30 Mar 2015 04:08:41 +0000 (21:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 18:12:36 +0000 (14:12 -0400)
In preparation for embedding the rndis state and other packet state into
the skb, cleanup the test for freeing the skb.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c

index b81bd37d3afbb1b8a6e3048cf0c7bd71f87a7afa..ecbd81385e96e184238132c6176f3d33117e7e7b 100644 (file)
@@ -870,6 +870,7 @@ int netvsc_send(struct hv_device *device,
                       (unsigned long)packet->send_completion_tid;
 
                packet->page_buf_cnt = 0;
+               packet->send_completion_tid = 0;
                packet->send_buf_index = section_index;
                packet->total_data_buflen += msd_len;
 
index 0c998186039e43e4fece13ea4d4fe53cd8dbeb19..75beb89aac9c68310f215ffea3faf1a7d41f9cac 100644 (file)
@@ -234,11 +234,10 @@ static void netvsc_xmit_completion(void *context)
        struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context;
        struct sk_buff *skb = (struct sk_buff *)
                (unsigned long)packet->send_completion_tid;
-       u32 index = packet->send_buf_index;
 
        kfree(packet);
 
-       if (skb && (index == NETVSC_INVALID_INDEX))
+       if (skb)
                dev_kfree_skb_any(skb);
 }