netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
@ 2008-05-22 10:07 Wang Chen
  2008-05-22 18:01 ` Jeff Garzik
  2008-05-23  1:54 ` Rusty Russell
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Chen @ 2008-05-22 10:07 UTC (permalink / raw)
  To: Rusty Russell, Jeff Garzik, David S. Miller, NETDEV

Use standard routine for queue purging.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 drivers/net/virtio_net.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f926b5a..fe7cdf2 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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);
 
-- 
1.5.4.rc3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-23  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 10:07 [PATCH 1/2] VIRTIO: Use __skb_queue_purge() Wang Chen
2008-05-22 18:01 ` Jeff Garzik
2008-05-23  1:54 ` Rusty Russell
2008-05-23  2:18   ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).