Commit 1173ab7b authored by David S. Miller's avatar David S. Miller

bnx2fc_fcoe: Use skb_queue_walk_safe().

Instead of direct list pointer accesses.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e3554197
...@@ -150,15 +150,11 @@ static void bnx2fc_clean_rx_queue(struct fc_lport *lp) ...@@ -150,15 +150,11 @@ static void bnx2fc_clean_rx_queue(struct fc_lport *lp)
struct fcoe_rcv_info *fr; struct fcoe_rcv_info *fr;
struct sk_buff_head *list; struct sk_buff_head *list;
struct sk_buff *skb, *next; struct sk_buff *skb, *next;
struct sk_buff *head;
bg = &bnx2fc_global; bg = &bnx2fc_global;
spin_lock_bh(&bg->fcoe_rx_list.lock); spin_lock_bh(&bg->fcoe_rx_list.lock);
list = &bg->fcoe_rx_list; list = &bg->fcoe_rx_list;
head = list->next; skb_queue_walk_safe(list, skb, next) {
for (skb = head; skb != (struct sk_buff *)list;
skb = next) {
next = skb->next;
fr = fcoe_dev_from_skb(skb); fr = fcoe_dev_from_skb(skb);
if (fr->fr_dev == lp) { if (fr->fr_dev == lp) {
__skb_unlink(skb, list); __skb_unlink(skb, list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment