diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-16 06:22:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-17 22:21:29 -0400 |
commit | c7e4f3bbb4ba4e48ab3b529d5016e454cee1ccd6 (patch) | |
tree | 76975288fd9448ee522867e3681978804431e736 | |
parent | 78a5b30b7324b2d66bcf7d2e3935877d3c26497c (diff) |
pkt_sched: Kill qdisc_lock_tree and qdisc_unlock_tree.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/sch_generic.h | 3 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 36 |
2 files changed, 3 insertions, 36 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 60e1e9f9e453..1eef8d0c9990 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -180,9 +180,6 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) | |||
180 | return qdisc->dev_queue->dev; | 180 | return qdisc->dev_queue->dev; |
181 | } | 181 | } |
182 | 182 | ||
183 | extern void qdisc_lock_tree(struct net_device *dev); | ||
184 | extern void qdisc_unlock_tree(struct net_device *dev); | ||
185 | |||
186 | static inline void sch_tree_lock(struct Qdisc *q) | 183 | static inline void sch_tree_lock(struct Qdisc *q) |
187 | { | 184 | { |
188 | spin_lock_bh(qdisc_root_lock(q)); | 185 | spin_lock_bh(qdisc_root_lock(q)); |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 8cdf0b4a6a5a..3d53e92ad9c8 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -29,44 +29,14 @@ | |||
29 | /* Main transmission queue. */ | 29 | /* Main transmission queue. */ |
30 | 30 | ||
31 | /* Modifications to data participating in scheduling must be protected with | 31 | /* Modifications to data participating in scheduling must be protected with |
32 | * queue->lock spinlock. | 32 | * qdisc_root_lock(qdisc) spinlock. |
33 | * | 33 | * |
34 | * The idea is the following: | 34 | * The idea is the following: |
35 | * - enqueue, dequeue are serialized via top level device | 35 | * - enqueue, dequeue are serialized via qdisc root lock |
36 | * spinlock queue->lock. | 36 | * - ingress filtering is also serialized via qdisc root lock |
37 | * - ingress filtering is serialized via top level device | ||
38 | * spinlock dev->rx_queue.lock. | ||
39 | * - updates to tree and tree walking are only done under the rtnl mutex. | 37 | * - updates to tree and tree walking are only done under the rtnl mutex. |
40 | */ | 38 | */ |
41 | 39 | ||
42 | void qdisc_lock_tree(struct net_device *dev) | ||
43 | __acquires(dev->rx_queue.lock) | ||
44 | { | ||
45 | unsigned int i; | ||
46 | |||
47 | local_bh_disable(); | ||
48 | for (i = 0; i < dev->num_tx_queues; i++) { | ||
49 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); | ||
50 | spin_lock(&txq->lock); | ||
51 | } | ||
52 | spin_lock(&dev->rx_queue.lock); | ||
53 | } | ||
54 | EXPORT_SYMBOL(qdisc_lock_tree); | ||
55 | |||
56 | void qdisc_unlock_tree(struct net_device *dev) | ||
57 | __releases(dev->rx_queue.lock) | ||
58 | { | ||
59 | unsigned int i; | ||
60 | |||
61 | spin_unlock(&dev->rx_queue.lock); | ||
62 | for (i = 0; i < dev->num_tx_queues; i++) { | ||
63 | struct netdev_queue *txq = netdev_get_tx_queue(dev, i); | ||
64 | spin_unlock(&txq->lock); | ||
65 | } | ||
66 | local_bh_enable(); | ||
67 | } | ||
68 | EXPORT_SYMBOL(qdisc_unlock_tree); | ||
69 | |||
70 | static inline int qdisc_qlen(struct Qdisc *q) | 40 | static inline int qdisc_qlen(struct Qdisc *q) |
71 | { | 41 | { |
72 | return q->q.qlen; | 42 | return q->q.qlen; |