aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-06-22 17:33:16 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-22 21:58:46 -0400
commit35b42da69e35536da603a50e40aa6c41b2f7b0f8 (patch)
tree45c3abeae1f65f4552c3ce5fdd2c01a032e15670
parent2ca4eb85744b1cd93076418ac8430ba527cc35bb (diff)
net_sched: remove a bogus warning in hfsc
In update_vf(): cftree_remove(cl); update_cfmin(cl->cl_parent); the cl_cfmin of cl->cl_parent is intentionally updated to 0 when that parent only has one child. And if this parent is root qdisc, we could end up, in hfsc_schedule_watchdog(), that we can't decide the next schedule time for qdisc watchdog. But it seems safe that we can just skip it, as this watchdog is not always scheduled anyway. Thanks to Marco for testing all the cases, nothing is broken. Reported-by: Marco Berizzi <pupilla@libero.it> Tested-by: Marco Berizzi <pupilla@libero.it> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/sch_hfsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 3ae9877ea205..3278a76f6861 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1385,8 +1385,8 @@ hfsc_schedule_watchdog(struct Qdisc *sch)
1385 if (next_time == 0 || next_time > q->root.cl_cfmin) 1385 if (next_time == 0 || next_time > q->root.cl_cfmin)
1386 next_time = q->root.cl_cfmin; 1386 next_time = q->root.cl_cfmin;
1387 } 1387 }
1388 WARN_ON(next_time == 0); 1388 if (next_time)
1389 qdisc_watchdog_schedule(&q->watchdog, next_time); 1389 qdisc_watchdog_schedule(&q->watchdog, next_time);
1390} 1390}
1391 1391
1392static int 1392static int