diff options
author | Patrick McHardy <kaber@trash.net> | 2006-11-29 20:36:20 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:31:43 -0500 |
commit | 5e50da01d0ce7ef0ba3ed6cfabd62f327da0aca6 (patch) | |
tree | 6f2205ceae40a7fd5b498e94c60b65140740a027 /net/sched/sch_red.c | |
parent | 43effa1e57fc4635e0301b27d78f9d83afe78974 (diff) |
[NET_SCHED]: Fix endless loops (part 2): "simple" qdiscs
Convert the "simple" qdiscs to use qdisc_tree_decrease_qlen() where
necessary:
- all graft operations
- destruction of old child qdiscs in prio, red and tbf change operation
- purging of queue in sfq change operation
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r-- | net/sched/sch_red.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index ee66c5ca80c6..acddad08850f 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c | |||
@@ -229,8 +229,10 @@ static int red_change(struct Qdisc *sch, struct rtattr *opt) | |||
229 | sch_tree_lock(sch); | 229 | sch_tree_lock(sch); |
230 | q->flags = ctl->flags; | 230 | q->flags = ctl->flags; |
231 | q->limit = ctl->limit; | 231 | q->limit = ctl->limit; |
232 | if (child) | 232 | if (child) { |
233 | qdisc_tree_decrease_qlen(q->qdisc, q->qdisc->q.qlen); | ||
233 | qdisc_destroy(xchg(&q->qdisc, child)); | 234 | qdisc_destroy(xchg(&q->qdisc, child)); |
235 | } | ||
234 | 236 | ||
235 | red_set_parms(&q->parms, ctl->qth_min, ctl->qth_max, ctl->Wlog, | 237 | red_set_parms(&q->parms, ctl->qth_min, ctl->qth_max, ctl->Wlog, |
236 | ctl->Plog, ctl->Scell_log, | 238 | ctl->Plog, ctl->Scell_log, |
@@ -308,8 +310,8 @@ static int red_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
308 | 310 | ||
309 | sch_tree_lock(sch); | 311 | sch_tree_lock(sch); |
310 | *old = xchg(&q->qdisc, new); | 312 | *old = xchg(&q->qdisc, new); |
313 | qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); | ||
311 | qdisc_reset(*old); | 314 | qdisc_reset(*old); |
312 | sch->q.qlen = 0; | ||
313 | sch_tree_unlock(sch); | 315 | sch_tree_unlock(sch); |
314 | return 0; | 316 | return 0; |
315 | } | 317 | } |