diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index fcaa4adefc8..58732509160 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -296,10 +296,16 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) { struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, timer); + struct net_device *dev = wd->qdisc->dev; wd->qdisc->flags &= ~TCQ_F_THROTTLED; smp_wmb(); - netif_schedule(wd->qdisc->dev); + if (spin_trylock(&dev->queue_lock)) { + qdisc_run(dev); + spin_unlock(&dev->queue_lock); + } else + netif_schedule(dev); + return HRTIMER_NORESTART; } |