From: Wang Chen <wangchen@cn.fujitsu.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
Jeff Garzik <jgarzik@pobox.com>,
"David S. Miller" <davem@davemloft.net>,
NETDEV <netdev@vger.kernel.org>
Subject: [PATCH 1/2] VIRTIO: Use __skb_queue_purge()
Date: Thu, 22 May 2008 18:07:43 +0800 [thread overview]
Message-ID: <483545EF.3070501@cn.fujitsu.com> (raw)
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
next reply other threads:[~2008-05-22 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 10:07 Wang Chen [this message]
2008-05-22 18:01 ` [PATCH 1/2] VIRTIO: Use __skb_queue_purge() Jeff Garzik
2008-05-23 1:54 ` Rusty Russell
2008-05-23 2:18 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483545EF.3070501@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).