Skip to content

Commit

Permalink
NETFRONT: Use __skb_queue_purge()
Browse files Browse the repository at this point in the history
Use standard routine for queue purging.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Wang Chen authored and Jeff Garzik committed May 22, 2008
1 parent 288369c commit 56cfe5d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,7 @@ static int xennet_poll(struct napi_struct *napi, int budget)
work_done++;
}

while ((skb = __skb_dequeue(&errq)))
kfree_skb(skb);
__skb_queue_purge(&errq);

work_done -= handle_incoming_queue(dev, &rxq);

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 56cfe5d

Please sign in to comment.