VIRTIO: Use __skb_queue_purge()
authorWang Chen <wangchen@cn.fujitsu.com>
Thu, 22 May 2008 10:07:43 +0000 (18:07 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 22 May 2008 18:01:02 +0000 (14:01 -0400)
Use standard routine for queue purging.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/virtio_net.c

index f926b5ab3d09291f2146ebd3928bc385503fb04e..fe7cdf2a2a236bc7257e1e5e3e2a5d2ef1086ad3 100644 (file)
@@ -470,8 +470,7 @@ static void virtnet_remove(struct virtio_device *vdev)
                kfree_skb(skb);
                vi->num--;
        }
-       while ((skb = __skb_dequeue(&vi->send)) != NULL)
-               kfree_skb(skb);
+       __skb_queue_purge(&vi->send);
 
        BUG_ON(vi->num != 0);