diff options
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index d253c16a314c..69fca2798804 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -190,16 +190,14 @@ static inline int qdisc_restart(struct Qdisc *q) | |||
190 | void __qdisc_run(struct Qdisc *q) | 190 | void __qdisc_run(struct Qdisc *q) |
191 | { | 191 | { |
192 | int quota = weight_p; | 192 | int quota = weight_p; |
193 | int work = 0; | ||
194 | 193 | ||
195 | while (qdisc_restart(q)) { | 194 | while (qdisc_restart(q)) { |
196 | work++; | ||
197 | /* | 195 | /* |
198 | * Ordered by possible occurrence: Postpone processing if | 196 | * Ordered by possible occurrence: Postpone processing if |
199 | * 1. we've exceeded packet quota | 197 | * 1. we've exceeded packet quota |
200 | * 2. another process needs the CPU; | 198 | * 2. another process needs the CPU; |
201 | */ | 199 | */ |
202 | if (work >= quota || need_resched()) { | 200 | if (--quota <= 0 || need_resched()) { |
203 | __netif_schedule(q); | 201 | __netif_schedule(q); |
204 | break; | 202 | break; |
205 | } | 203 | } |