diff options
-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 fcaa4ad..5873250 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; } |