From: Wang Chen <wangchen@cn•fujitsu.com>
To: Jeff Garzik <jgarzik@pobox•com>,
"David S. Miller" <davem@davemloft•net>,
NETDEV <netdev@vger•kernel.org>
Subject: [PATCH 2/2] NETFRONT: Use __skb_queue_purge()
Date: Thu, 22 May 2008 18:09:06 +0800 [thread overview]
Message-ID: <48354642.2090508@cn.fujitsu.com> (raw)
Use standard routine for queue purging.
Signed-off-by: Wang Chen <wangchen@cn•fujitsu.com>
---
drivers/net/xen-netfront.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 8bddff1..d26f69b 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -946,8 +946,7 @@ err:
work_done++;
}
- while ((skb = __skb_dequeue(&errq)))
- kfree_skb(skb);
+ __skb_queue_purge(&errq);
work_done -= handle_incoming_queue(dev, &rxq);
@@ -1079,8 +1078,7 @@ static void xennet_release_rx_bufs(struct netfront_info *np)
}
}
- while ((skb = __skb_dequeue(&free_list)) != NULL)
- dev_kfree_skb(skb);
+ __skb_queue_purge(&free_list);
spin_unlock_bh(&np->rx_lock);
}
--
1.5.4.rc3
reply other threads:[~2008-05-22 10:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48354642.2090508@cn.fujitsu.com \
--to=wangchen@cn$(echo .)fujitsu.com \
--cc=davem@davemloft$(echo .)net \
--cc=jgarzik@pobox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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