summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-17 00:53:03 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-17 19:21:30 -0700
commit83874000929ed63aef30b44083a9f713135ff040 (patch)
tree7646fd185751cad8665eca19aa3f87d13c37eade /net/core/dev.c
parentc7e4f3bbb4ba4e48ab3b529d5016e454cee1ccd6 (diff)
pkt_sched: Kill netdev_queue lock.
We can simply use the qdisc->q.lock for all of the qdisc tree synchronization. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 6741e344ac5..32a13772c1c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2080,10 +2080,12 @@ static int ing_filter(struct sk_buff *skb)
rxq = &dev->rx_queue;
- spin_lock(&rxq->lock);
- if ((q = rxq->qdisc) != NULL)
+ q = rxq->qdisc;
+ if (q) {
+ spin_lock(qdisc_lock(q));
result = q->enqueue(skb, q);
- spin_unlock(&rxq->lock);
+ spin_unlock(qdisc_lock(q));
+ }
return result;
}
@@ -4173,7 +4175,6 @@ static void netdev_init_one_queue(struct net_device *dev,
struct netdev_queue *queue,
void *_unused)
{
- spin_lock_init(&queue->lock);
queue->dev = dev;
}