[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <483545EF.3070501@cn.fujitsu.com>
Date: Thu, 22 May 2008 18:07:43 +0800
From: Wang Chen <wangchen@...fujitsu.com>
To: Rusty Russell <rusty@...tcorp.com.au>,
Jeff Garzik <jgarzik@...ox.com>,
"David S. Miller" <davem@...emloft.net>,
NETDEV <netdev@...r.kernel.org>
Subject: [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
Use standard routine for queue purging.
Signed-off-by: Wang Chen <wangchen@...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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists