netdev: Move queue_lock into struct netdev_queue.

The lock is now an attribute of the device queue.

One thing to notice is that "suspicious" places
emerge which will need specific training about
multiple queue handling.  They are so marked with
explicit "netdev->rx_queue" and "netdev->tx_queue"
references.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2008-07-08 17:18:23 -07:00
parent 5ce2d488fe
commit dc2b48475a
12 changed files with 73 additions and 62 deletions

View File

@@ -333,9 +333,9 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
for (i = 0; i < n; i++)
d->table[i] = data[i];
spin_lock_bh(&qdisc_dev(sch)->queue_lock);
spin_lock_bh(&sch->dev_queue->lock);
d = xchg(&q->delay_dist, d);
spin_unlock_bh(&qdisc_dev(sch)->queue_lock);
spin_unlock_bh(&sch->dev_queue->lock);
kfree(d);
return 0;