]> git.baikalelectronics.ru Git - kernel.git/commit
pkt_sched: Fix queue quiescence testing in dev_deactivate().
authorDavid S. Miller <davem@davemloft.net>
Wed, 13 Aug 2008 22:18:38 +0000 (15:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Aug 2008 22:18:38 +0000 (15:18 -0700)
commitcbe1e92e8bd7b67f24c88abd6cf15dc1f6e9ffd4
tree26d693207ad5c5e9ea79a2b21de48b1e409f628e
parent09ded0d04a456d43bed153ff3d3e8c2301b2b4f9
pkt_sched: Fix queue quiescence testing in dev_deactivate().

Based upon discussions with Jarek P. and Herbert Xu.

First, we're testing the wrong qdisc.  We just reset the device
queue qdiscs to &noop_qdisc and checking it's state is completely
pointless here.

We want to wait until the previous qdisc that was sitting at
the ->qdisc pointer is not busy any more.  And that would be
->qdisc_sleeping.

Because of how we propagate the samples qdisc pointer down into
qdisc_run and friends via per-cpu ->output_queue and netif_schedule,
we have to wait also for the __QDISC_STATE_SCHED bit to clear as
well.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c