[NET]: Kill skb->list
Remove the "list" member of struct sk_buff, as it is entirely redundant. All SKB list removal callers know which list the SKB is on, so storing this in sk_buff does nothing other than taking up some space. Two tricky bits were SCTP, which I took care of, and two ATM drivers which Francois Romieu <romieu@fr.zoreil.com> fixed up. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
This commit is contained in:
committed by
David S. Miller
parent
6869c4d8e0
commit
8728b834b2
@ -2903,19 +2903,18 @@ static struct net_device_stats *usbnet_get_stats (struct net_device *net)
|
||||
* completion callbacks. 2.5 should have fixed those bugs...
|
||||
*/
|
||||
|
||||
static void defer_bh (struct usbnet *dev, struct sk_buff *skb)
|
||||
static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list)
|
||||
{
|
||||
struct sk_buff_head *list = skb->list;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave (&list->lock, flags);
|
||||
__skb_unlink (skb, list);
|
||||
spin_unlock (&list->lock);
|
||||
spin_lock (&dev->done.lock);
|
||||
__skb_queue_tail (&dev->done, skb);
|
||||
spin_lock_irqsave(&list->lock, flags);
|
||||
__skb_unlink(skb, list);
|
||||
spin_unlock(&list->lock);
|
||||
spin_lock(&dev->done.lock);
|
||||
__skb_queue_tail(&dev->done, skb);
|
||||
if (dev->done.qlen == 1)
|
||||
tasklet_schedule (&dev->bh);
|
||||
spin_unlock_irqrestore (&dev->done.lock, flags);
|
||||
tasklet_schedule(&dev->bh);
|
||||
spin_unlock_irqrestore(&dev->done.lock, flags);
|
||||
}
|
||||
|
||||
/* some work can't be done in tasklets, so we use keventd
|
||||
@ -3120,7 +3119,7 @@ block:
|
||||
break;
|
||||
}
|
||||
|
||||
defer_bh (dev, skb);
|
||||
defer_bh(dev, skb, &dev->rxq);
|
||||
|
||||
if (urb) {
|
||||
if (netif_running (dev->net)
|
||||
@ -3490,7 +3489,7 @@ static void tx_complete (struct urb *urb, struct pt_regs *regs)
|
||||
|
||||
urb->dev = NULL;
|
||||
entry->state = tx_done;
|
||||
defer_bh (dev, skb);
|
||||
defer_bh(dev, skb, &dev->txq);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user