]> git.baikalelectronics.ru Git - kernel.git/commit
net-sched: sch_htb: move hash and sibling list removal to htb_delete
authorPatrick McHardy <kaber@trash.net>
Sun, 6 Jul 2008 06:22:19 +0000 (23:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Jul 2008 06:22:19 +0000 (23:22 -0700)
commit2ee451cf2df9bd605aa46ba443c633bb210a6f9e
treeaa3c73e765d983f91f6509753c35a019bae19fd8
parent67a839c70317ea0ee0c248ace29a2f79bfe56024
net-sched: sch_htb: move hash and sibling list removal to htb_delete

Hash list removal currently happens twice (once in htb_delete, once
in htb_destroy_class), which makes it harder to use the dynamically
sized class hash without adding special cases for HTB. The reason is
that qdisc destruction destroys classes in hierarchical order, which
is not necessary if filters are destroyed in a separate iteration
during qdisc destruction.

Adjust qdisc destruction to follow the same scheme as other hierarchical
qdiscs by first performing a filter destruction pass, then destroying
all classes in hash order.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_htb.c